WC_Admin_Meta_Boxes::add_meta_boxes()publicWC 1.0

Add WC Meta boxes.

Метод класса: WC_Admin_Meta_Boxes{}

Хуков нет.

Возвращает

null. Ничего.

Использование

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

Код WC_Admin_Meta_Boxes::add_meta_boxes() WC 7.3.0

public function add_meta_boxes() {
	$screen    = get_current_screen();
	$screen_id = $screen ? $screen->id : '';

	// Products.
	add_meta_box( 'postexcerpt', __( 'Product short description', 'woocommerce' ), 'WC_Meta_Box_Product_Short_Description::output', 'product', 'normal' );
	add_meta_box( 'woocommerce-product-data', __( 'Product data', 'woocommerce' ), 'WC_Meta_Box_Product_Data::output', 'product', 'normal', 'high' );
	add_meta_box( 'woocommerce-product-images', __( 'Product gallery', 'woocommerce' ), 'WC_Meta_Box_Product_Images::output', 'product', 'side', 'low' );

	// Orders.
	foreach ( wc_get_order_types( 'order-meta-boxes' ) as $type ) {
		$order_type_object = get_post_type_object( $type );
		OrderEdit::add_order_meta_boxes( $type, $order_type_object->labels->singular_name );
	}

	// Coupons.
	add_meta_box( 'woocommerce-coupon-data', __( 'Coupon data', 'woocommerce' ), 'WC_Meta_Box_Coupon_Data::output', 'shop_coupon', 'normal', 'high' );

	// Comment rating.
	if ( 'comment' === $screen_id && isset( $_GET['c'] ) && metadata_exists( 'comment', wc_clean( wp_unslash( $_GET['c'] ) ), 'rating' ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Recommended
		add_meta_box( 'woocommerce-rating', __( 'Rating', 'woocommerce' ), 'WC_Meta_Box_Product_Reviews::output', 'comment', 'normal', 'high' );
	}
}