Automattic\WooCommerce\Internal\Admin\Onboarding

OnboardingProfile::trigger_complete()public staticWC 1.0

Trigger the woocommerce_onboarding_profile_completed action

{} Это метод класса: OnboardingProfile{}

Хуки из метода

Возвращает

null. Ничего.

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

$result = OnboardingProfile::trigger_complete( $old_value, $value );
$old_value(массив) (обязательный)
Previous value.
$value(массив) (обязательный)
Current value.

Код OnboardingProfile::trigger_complete() WC 6.6.1

public static function trigger_complete( $old_value, $value ) {
	if ( isset( $old_value['completed'] ) && $old_value['completed'] ) {
		return;
	}

	if ( ! isset( $value['completed'] ) || ! $value['completed'] ) {
		return;
	}

	/**
	 * Action hook fired when the onboarding profile (or onboarding wizard,
	 * or profiler) is completed.
	 *
	 * @since 1.5.0
	 */
	do_action( 'woocommerce_onboarding_profile_completed' );
}