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( $post_id );
$post_id(int) (обязательный)
Post ID.

Код OrdersScheduler::possibly_schedule_import() WC 6.4.1

public static function possibly_schedule_import( $post_id ) {
	if ( 'shop_order' !== get_post_type( $post_id ) && 'woocommerce_refund_created' !== current_filter() ) {
		return;
	}

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