Automattic\WooCommerce\Admin\RemoteInboxNotifications

RemoteInboxNotificationsEngine::update_profile_option()public staticWC 1.0

This is triggered when the profile option is updated and if the profiler is being completed, triggers a run of the engine.

Method of the class: RemoteInboxNotificationsEngine{}

No Hooks.

Return

null. Nothing (null).

Usage

$result = RemoteInboxNotificationsEngine::update_profile_option( $old_value, $new_value );
$old_value(mixed) (required)
Old value.
$new_value(mixed) (required)
New value.

RemoteInboxNotificationsEngine::update_profile_option() code WC 8.7.0

public static function update_profile_option( $old_value, $new_value ) {
	// Return early if we're not completing the profiler.
	if (
		( isset( $old_value['completed'] ) && $old_value['completed'] ) ||
		! isset( $new_value['completed'] ) ||
		! $new_value['completed']
	) {
		return;
	}

	self::run();
}