add_meta_boxes_(screen_id)
Provides an opportunity to inject custom meta boxes into the order editor screen. This hook is an analog of add_meta_boxes_<POST_TYPE> as provided by WordPress core.
Usage
add_action( 'add_meta_boxes_(screen_id)', 'wp_kama_add_meta_boxes_screen_id_action' ); /** * Function for `add_meta_boxes_(screen_id)` action-hook. * * @param WC_Order $order The order being edited. * * @return void */ function wp_kama_add_meta_boxes_screen_id_action( $order ){ // action... }
- $order(WC_Order)
- The order being edited.
Changelog
Since 7.4.0 | Introduced. |
Where the hook is called
add_meta_boxes_(screen_id)
woocommerce/src/Internal/Admin/Orders/Edit.php 180
do_action( 'add_meta_boxes_' . $this->screen_id, $this->order );
Where the hook is used in WooCommerce
woocommerce/includes/tracks/events/class-wc-products-tracking.php 35
add_action( 'add_meta_boxes_product', array( $this, 'track_product_updated_client_side' ), 10 );