add_meta_boxes action-hookWC 3.8.0.

This is a WordPress - add_meta_boxes hook. The plugin just uses it.

From wp-admin/includes/meta-boxes.php.

Fires after all built-in meta boxes have been added. Custom metaboxes may be enqueued here.

Usage

add_action( 'add_meta_boxes', 'wp_kama_add_meta_boxes_action', 10, 2 );

/**
 * Function for `add_meta_boxes` action-hook.
 * 
 * @param string  $post_type Post type.
 * @param WP_Post $post      Post object.
 *
 * @return void
 */
function wp_kama_add_meta_boxes_action( $post_type, $post ){

	// action...
}
$post_type(string)
Post type.
$post(WP_Post)
Post object.

Changelog

Since 3.8.0. Introduced.

Where the hook is called

Edit::setup()
add_meta_boxes
woocommerce/src/Internal/Admin/Orders/Edit.php 165
do_action( 'add_meta_boxes', $this->screen_id, $this->order );

Where the hook is used in WooCommerce

woocommerce/includes/admin/class-wc-admin-meta-boxes.php 45
add_action( 'add_meta_boxes', array( $this, 'remove_meta_boxes' ), 10 );
woocommerce/includes/admin/class-wc-admin-meta-boxes.php 46
add_action( 'add_meta_boxes', array( $this, 'rename_meta_boxes' ), 20 );
woocommerce/includes/admin/class-wc-admin-meta-boxes.php 47
add_action( 'add_meta_boxes', array( $this, 'add_meta_boxes' ), 30 );
woocommerce/includes/admin/class-wc-admin-meta-boxes.php 48
add_action( 'add_meta_boxes', array( $this, 'add_product_boxes_sort_order' ), 40 );
woocommerce/src/Internal/Admin/ShippingLabelBanner.php 29
add_action( 'add_meta_boxes', array( $this, 'add_meta_boxes' ), 6, 2 );