woocommerce_process_shop_order_meta хук-событиеWC 2.1.0

Save meta for shop order.

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

add_action( 'woocommerce_process_shop_order_meta', 'wp_kama_woocommerce_process_shop_order_meta_action', 10, 2 );

/**
 * Function for `woocommerce_process_shop_order_meta` action-hook.
 * 
 * @param int       $order_id Order ID.
 * @param \WC_Order $order    Post object.
 *
 * @return void
 */
function wp_kama_woocommerce_process_shop_order_meta_action( $order_id, $order ){

	// action...
}
$order_id(int)
Order ID.
$order(\WC_Order)
Post object.

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

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

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

Edit::handle_order_update()
woocommerce_process_shop_order_meta
WC_Admin_Meta_Boxes::save_meta_boxes()
woocommerce_process_shop_order_meta
woocommerce/src/Internal/Admin/Orders/Edit.php 152
do_action( 'woocommerce_process_shop_order_meta', $this->order->get_id(), $this->order );
woocommerce/includes/admin/class-wc-admin-meta-boxes.php 277
do_action( 'woocommerce_process_shop_order_meta', $post_id, $post );

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

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 );