WordPress как на ладони
Недорогой хостинг для сайтов на WordPress: wordpress.jino.ru
класс не описан

WC_Meta_Box_Order_Items() WC 1.0

WC_Meta_Box_Order_Items Class.

Хуков нет.

Возвращает

Null. Ничего.

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

$WC_Meta_Box_Order_Items = new WC_Meta_Box_Order_Items();
// use class methods

Методы

  1. output( $post )
  2. save( $post_id )

Код WC Meta Box Order Items: woocommerce/includes/admin/meta-boxes/class-wc-meta-box-order-items.php WC 4.3.1

<?php
class WC_Meta_Box_Order_Items {

	/**
	 * Output the metabox.
	 *
	 * @param WP_Post $post
	 */
	public static function output( $post ) {
		global $post, $thepostid, $theorder;

		if ( ! is_int( $thepostid ) ) {
			$thepostid = $post->ID;
		}

		if ( ! is_object( $theorder ) ) {
			$theorder = wc_get_order( $thepostid );
		}

		$order = $theorder;
		$data  = get_post_meta( $post->ID );

		include 'views/html-order-items.php';
	}

	/**
	 * Save meta box data.
	 *
	 * @param int $post_id
	 */
	public static function save( $post_id ) {
		/**
		 * This $_POST variable's data has been validated and escaped
		 * inside `wc_save_order_items()` function.
		 */
		wc_save_order_items( $post_id, $_POST );
	}
}