Automattic\WooCommerce\Internal\Admin\Notes

MagentoMigration::possibly_add_note()public staticWC 1.0

Add the note if it passes predefined conditions.

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

Хуков нет.

Возвращает

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

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

$result = MagentoMigration::possibly_add_note();

Код MagentoMigration::possibly_add_note() WC 8.7.0

public static function possibly_add_note() {
	$onboarding_profile = get_option( OnboardingProfile::DATA_OPTION, array() );

	if ( empty( $onboarding_profile ) ) {
		return;
	}

	if (
		! isset( $onboarding_profile['other_platform'] ) ||
		'magento' !== $onboarding_profile['other_platform']
	) {
		return;
	}

	if (
		! isset( $onboarding_profile['setup_client'] ) ||
		$onboarding_profile['setup_client']
	) {
		return;
	}

	WC()->queue()->schedule_single( time() + ( 5 * MINUTE_IN_SECONDS ), 'woocommerce_admin_magento_migration_note' );
}