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. Ничего.

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

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

Код OrdersScheduler::possibly_schedule_import() WC 7.3.0

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

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