Automattic\WooCommerce\Utilities
OrderUtil::init_theorder_object()
Helper function to initialize the global $theorder object, mostly used during order meta boxes rendering.
Метод класса: OrderUtil{}
Хуков нет.
Возвращает
true|false|WC_Order|WC_Order_Refund
. WC_Order object.
Использование
$result = OrderUtil::init_theorder_object( $post_or_order_object );
Код OrderUtil::init_theorder_object() OrderUtil::init theorder object WC 9.8.4
public static function init_theorder_object( $post_or_order_object ) { return wc_get_container()->get( COTMigrationUtil::class )->init_theorder_object( $post_or_order_object ); }