woocommerce_checkout_update_order_meta
Action hook fired after an order is created used to add custom meta to the order.
Usage
add_action( 'woocommerce_checkout_update_order_meta', 'wp_kama_woocommerce_checkout_update_order_meta_action', 10, 2 ); /** * Function for `woocommerce_checkout_update_order_meta` action-hook. * * @param $order_id * @param $data * * @return void */ function wp_kama_woocommerce_checkout_update_order_meta_action( $order_id, $data ){ // action... }
- $order_id
- -
- $data
- -
Changelog
Since 3.0.0 | Introduced. |
Where the hook is called
woocommerce_checkout_update_order_meta
woocommerce/includes/class-wc-checkout.php 459
do_action( 'woocommerce_checkout_update_order_meta', $order_id, $data );