Automattic\WooCommerce\Internal\Admin\Schedulers

OrdersScheduler::possibly_schedule_import()public staticWC 1.0

Schedule this import if the post is an order or refund.

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

Хуков нет.

Возвращает

null. Ничего (null).

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

$result = OrdersScheduler::possibly_schedule_import( $order_id );
$order_id(int) (обязательный)
Post ID.

Код OrdersScheduler::possibly_schedule_import() WC 9.4.2

public static function possibly_schedule_import( $order_id ) {
	if ( ! OrderUtil::is_order( $order_id, array( 'shop_order' ) ) && 'woocommerce_refund_created' !== current_filter() ) {
		return $order_id;
	}

	self::schedule_action( 'import', array( $order_id ) );
	return $order_id;
}