Automattic\WooCommerce\Internal\Admin

CustomerEffortScoreTracks::maybe_enqueue_ces_survey_for_product()privateWC 1.0

Maybe enqueue the CES survey, if product is being added or edited.

Method of the class: CustomerEffortScoreTracks{}

No Hooks.

Return

null. Nothing.

Usage

// private - for code of main (parent) class only
$result = $this->maybe_enqueue_ces_survey_for_product(;

CustomerEffortScoreTracks::maybe_enqueue_ces_survey_for_product() code WC 7.1.1

private function maybe_enqueue_ces_survey_for_product(
	$new_status,
	$old_status
) {
	if ( 'publish' !== $new_status ) {
		return;
	}

	if ( 'publish' !== $old_status ) {
		$this->enqueue_ces_survey_for_new_product();
	} else {
		$this->enqueue_ces_survey_for_edited_product();
	}
}