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.

Note that the documentation for this hook (and for the corresponding 'add_meta_boxes_<SCREEN_ID>' hook) suggest that a post type will be supplied for the first parameter, and and an instance of WP_Post will be supplied as the second parameter. We are not doing that here, however WordPress itself also deviates from this in respect of comments and (though now less relevant) links.

Usage

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

/**
 * Function for `add_meta_boxes` action-hook.
 * 
 * @param string                    $object_type The type of the current object that meta boxes were added to. Can be 'post', 'page', custom post types, 'comment', or 'link'.
 * @param WP_Post|WP_Comment|object $object      The post, comment, or link object. Type varies depending on `$object_type`.
 *
 * @return void
 */
function wp_kama_add_meta_boxes_action( $object_type, $object ){

	// action...
}
$object_type(string)
The type of the current object that meta boxes were added to. Can be 'post', 'page', custom post types, 'comment', or 'link'.
$object(WP_Post|WP_Comment|object)
The post, comment, or link object. Type varies depending on $object_type.

Changelog

Since 3.8.0. Introduced.

Where the hook is called

Edit::setup()
add_meta_boxes
woocommerce/src/Internal/Admin/Orders/Edit.php 170
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 34
add_action( 'add_meta_boxes', array( $this, 'add_meta_boxes' ), 6, 2 );