wc-payment-settings_boot_dependencies
Filters the boot script-module dependencies for the wc-payment-settings page.
Surfaces extending this page can append entries to the boot dependency list. Each entry is an array with 'import' (string 'static' or 'dynamic') and 'id' (script-module handle) keys.
Использование
add_filter( 'wc-payment-settings_boot_dependencies', 'wp_kama_wc_payment_settings_boot_dependencies_filter' );
/**
* Function for `wc-payment-settings_boot_dependencies` filter-hook.
*
* @param array $boot_dependencies Boot dependencies for the page.
*
* @return array
*/
function wp_kama_wc_payment_settings_boot_dependencies_filter( $boot_dependencies ){
// filter...
return $boot_dependencies;
}
- $boot_dependencies(массив)
- Boot dependencies for the page.
Где вызывается хук
wc-payment-settings_boot_dependencies
woocommerce/assets/client/routes/pages/wc-payment-settings/page.php 229-232
$boot_dependencies = apply_filters( 'wc-payment-settings_boot_dependencies', $boot_dependencies );