woocommerce_new_webhook_data
Использование
add_filter( 'woocommerce_new_webhook_data', 'wp_kama_woocommerce_new_webhook_data_filter', 10, 3 ); function wp_kama_woocommerce_new_webhook_data_filter( $array, $data, $that ){ // filter... return $array; }
- $array
- -
- $data
- -
- $that
- -
Где вызывается хук
woocommerce/includes/legacy/api/v3/class-wc-api-webhooks.php 193-200
$webhook_data = apply_filters( 'woocommerce_new_webhook_data', array( 'post_type' => 'shop_webhook', 'post_status' => 'publish', 'ping_status' => 'closed', 'post_author' => get_current_user_id(), 'post_password' => 'webhook_' . wp_generate_password(), 'post_title' => ! empty( $data['name'] ) ? $data['name'] : sprintf( __( 'Webhook created on %s', 'woocommerce' ), strftime( _x( '%b %d, %Y @ %I:%M %p', 'Webhook created on date parsed by strftime', 'woocommerce' ) ) ), ), $data, $this );
woocommerce/includes/legacy/api/v2/class-wc-api-webhooks.php 193-200
$webhook_data = apply_filters( 'woocommerce_new_webhook_data', array( 'post_type' => 'shop_webhook', 'post_status' => 'publish', 'ping_status' => 'closed', 'post_author' => get_current_user_id(), 'post_password' => 'webhook_' . wp_generate_password(), 'post_title' => ! empty( $data['name'] ) ? $data['name'] : sprintf( __( 'Webhook created on %s', 'woocommerce' ), strftime( _x( '%b %d, %Y @ %I:%M %p', 'Webhook created on date parsed by strftime', 'woocommerce' ) ) ), ), $data, $this );