WordPress at Your Fingertips
function is not described

WC_Admin_Meta_Boxes::__construct() public WC 1.0

Constructor.

{} It's a method of the class: WC_Admin_Meta_Boxes{}

No Hooks.

Return

null. Nothing.

Usage

$WC_Admin_Meta_Boxes = new WC_Admin_Meta_Boxes();
$WC_Admin_Meta_Boxes->__construct();

Code of WC_Admin_Meta_Boxes::__construct() WC 5.8.0

public function __construct() {
	add_action( 'add_meta_boxes', array( $this, 'remove_meta_boxes' ), 10 );
	add_action( 'add_meta_boxes', array( $this, 'rename_meta_boxes' ), 20 );
	add_action( 'add_meta_boxes', array( $this, 'add_meta_boxes' ), 30 );
	add_action( 'save_post', array( $this, 'save_meta_boxes' ), 1, 2 );

	/**
	 * Save Order Meta Boxes.
	 *
	 * In order:
	 *      Save the order items.
	 *      Save the order totals.
	 *      Save the order downloads.
	 *      Save order data - also updates status and sends out admin emails if needed. Last to show latest data.
	 *      Save actions - sends out other emails. Last to show latest data.
	 */
	add_action( 'woocommerce_process_shop_order_meta', 'WC_Meta_Box_Order_Items::save', 10 );
	add_action( 'woocommerce_process_shop_order_meta', 'WC_Meta_Box_Order_Downloads::save', 30, 2 );
	add_action( 'woocommerce_process_shop_order_meta', 'WC_Meta_Box_Order_Data::save', 40 );
	add_action( 'woocommerce_process_shop_order_meta', 'WC_Meta_Box_Order_Actions::save', 50, 2 );

	// Save Product Meta Boxes.
	add_action( 'woocommerce_process_product_meta', 'WC_Meta_Box_Product_Data::save', 10, 2 );
	add_action( 'woocommerce_process_product_meta', 'WC_Meta_Box_Product_Images::save', 20, 2 );

	// Save Coupon Meta Boxes.
	add_action( 'woocommerce_process_shop_coupon_meta', 'WC_Meta_Box_Coupon_Data::save', 10, 2 );

	// Save Rating Meta Boxes.
	add_filter( 'wp_update_comment_data', 'WC_Meta_Box_Product_Reviews::save', 1 );

	// Error handling (for showing errors from meta boxes on next page load).
	add_action( 'admin_notices', array( $this, 'output_errors' ) );
	add_action( 'shutdown', array( $this, 'save_errors' ) );

	add_filter( 'theme_product_templates', array( $this, 'remove_block_templates' ), 10, 1 );
}