woocommerce_process_(post_type)_meta хук-событиеWC 2.1.0

Save meta for product.

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

add_action( 'woocommerce_process_(post_type)_meta', 'wp_kama_woocommerce_process_post_type_meta_action', 10, 2 );

/**
 * Function for `woocommerce_process_(post_type)_meta` action-hook.
 * 
 * @param int    $post_id Post ID.
 * @param object $post    Post object.
 *
 * @return void
 */
function wp_kama_woocommerce_process_post_type_meta_action( $post_id, $post ){

	// action...
}
$post_id(int)
Post ID.
$post(объект)
Post object.

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

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

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

WC_Admin_Meta_Boxes::save_meta_boxes()
woocommerce_process_(post_type)_meta
woocommerce/includes/admin/class-wc-admin-meta-boxes.php 287
do_action( 'woocommerce_process_' . $post->post_type . '_meta', $post_id, $post );

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

woocommerce/includes/admin/class-wc-admin-meta-boxes.php 58
add_action( 'woocommerce_process_product_meta', 'WC_Meta_Box_Product_Data::save', 10, 2 );
woocommerce/includes/admin/class-wc-admin-meta-boxes.php 59
add_action( 'woocommerce_process_product_meta', 'WC_Meta_Box_Product_Images::save', 20, 2 );
woocommerce/includes/admin/class-wc-admin-meta-boxes.php 62
add_action( 'woocommerce_process_shop_coupon_meta', 'WC_Meta_Box_Coupon_Data::save', 10, 2 );
woocommerce/includes/tracks/events/class-wc-orders-tracking.php 24
add_action( 'woocommerce_process_shop_order_meta', array( $this, 'track_order_action' ), 51 );
woocommerce/src/Internal/Admin/Orders/Edit.php 69
add_action( 'woocommerce_process_shop_order_meta', 'WC_Meta_Box_Order_Items::save', 10 );
woocommerce/src/Internal/Admin/Orders/Edit.php 70
add_action( 'woocommerce_process_shop_order_meta', 'WC_Meta_Box_Order_Downloads::save', 30, 2 );
woocommerce/src/Internal/Admin/Orders/Edit.php 71
add_action( 'woocommerce_process_shop_order_meta', 'WC_Meta_Box_Order_Data::save', 40 );
woocommerce/src/Internal/Admin/Orders/Edit.php 72
add_action( 'woocommerce_process_shop_order_meta', 'WC_Meta_Box_Order_Actions::save', 50, 2 );