Automattic\WooCommerce\Internal\Admin\Onboarding

OnboardingSetupWizard::trigger_profile_completed_action()publicWC 1.0

Trigger the woocommerce_onboarding_profile_completed action

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

Return

null. Nothing.

Usage

$OnboardingSetupWizard = new OnboardingSetupWizard();
$OnboardingSetupWizard->trigger_profile_completed_action( $old_value, $value );
$old_value(array) (required)
Previous value.
$value(array) (required)
Current value.

Code of OnboardingSetupWizard::trigger_profile_completed_action() WC 7.1.0

public function trigger_profile_completed_action( $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' );
}