Automattic\WooCommerce\Internal

OrderCouponDataMigrator::enqueuepublicWC 1.0

Start the background process for coupon data conversion.

Method of the class: OrderCouponDataMigrator{}

No Hooks.

Returns

String. Informative string to show after the tool is triggered in UI.

Usage

$OrderCouponDataMigrator = new OrderCouponDataMigrator();
$OrderCouponDataMigrator->enqueue(): string;

OrderCouponDataMigrator::enqueue() code WC 10.8.1

public function enqueue(): string {
	$batch_processor = wc_get_container()->get( BatchProcessingController::class );
	if ( $batch_processor->is_enqueued( self::class ) ) {
		return __( 'Background process for coupon meta conversion already started, nothing done.', 'woocommerce' );
	}

	$batch_processor->enqueue_processor( self::class );
	return __( 'Background process for coupon meta conversion started', 'woocommerce' );
}