experimental_woocommerce_admin_payment_reactify_render_sections хук-фильтрWC 9.3.0

Modify the optional set of payments settings sections to be rendered using React.

This filter allows plugins to add or remove optional sections (typically offline gateways) that should be rendered using React. Sections should be identified by their gateway IDs. Note: The main Payments page ("main") and the Offline overview ("offline") are always React-only and cannot be disabled via this filter.

Использование

add_filter( 'experimental_woocommerce_admin_payment_reactify_render_sections', 'wp_kama_experimental_woocommerce_admin_payment_reactify_render_sections_filter' );

/**
 * Function for `experimental_woocommerce_admin_payment_reactify_render_sections` filter-hook.
 * 
 * @param array $sections List of section identifiers to be rendered using React.
 *
 * @return array
 */
function wp_kama_experimental_woocommerce_admin_payment_reactify_render_sections_filter( $sections ){

	// filter...
	return $sections;
}
$sections(массив)
List of section identifiers to be rendered using React.

Список изменений

С версии 9.3.0 Введена.

Где вызывается хук

WC_Settings_Payment_Gateways::get_reactified_sections()
experimental_woocommerce_admin_payment_reactify_render_sections
woocommerce/includes/admin/settings/class-wc-settings-payment-gateways.php 195
$optional_reactified_sections = apply_filters( 'experimental_woocommerce_admin_payment_reactify_render_sections', $optional_reactified_sections );

Где используется хук в WooCommerce

Использование не найдено.