Automattic\WooCommerce\Internal\Admin\Schedulers

OrdersScheduler::get_failed_order_importspublic staticWC 11.0.0

Get the recorded failed order imports.

Method of the class: OrdersScheduler{}

No Hooks.

Returns

Array. Array with 'ids' (int[]) and 'overflow' (int) keys.

Usage

$result = OrdersScheduler::get_failed_order_imports(): array;

Changelog

Since 11.0.0 Introduced.

OrdersScheduler::get_failed_order_imports() code WC 11.0.1

public static function get_failed_order_imports(): array {
	$value = get_option( self::FAILED_ORDER_IMPORTS_OPTION, array() );
	if ( ! is_array( $value ) ) {
		$value = array();
	}

	return array(
		'ids'      => isset( $value['ids'] ) && is_array( $value['ids'] ) ? array_map( 'absint', $value['ids'] ) : array(),
		'overflow' => isset( $value['overflow'] ) ? absint( $value['overflow'] ) : 0,
	);
}