woocommerce_rest_api_valid_to_save
Использование
add_filter( 'woocommerce_rest_api_valid_to_save', 'wp_kama_woocommerce_rest_api_valid_to_save_filter' ); /** * Function for `woocommerce_rest_api_valid_to_save` filter-hook. * * @param $condition * * @return */ function wp_kama_woocommerce_rest_api_valid_to_save_filter( $condition ){ // filter... return $condition; }
- $condition
- -
Где вызывается хук
woocommerce_rest_api_valid_to_save
woocommerce/includes/admin/settings/class-wc-settings-advanced.php 505
if ( apply_filters( 'woocommerce_rest_api_valid_to_save', ! in_array( $current_section, array( 'keys', 'webhooks' ), true ) ) ) {