Automattic\WooCommerce\Internal\Admin

CustomerEffortScoreTracks::enqueue_ces_survey_for_edited_product()privateWC 1.0

Enqueue the CES survey trigger for an existing product.

Method of the class: CustomerEffortScoreTracks{}

No Hooks.

Return

null. Nothing.

Usage

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

CustomerEffortScoreTracks::enqueue_ces_survey_for_edited_product() code WC 7.1.1

private function enqueue_ces_survey_for_edited_product() {
	if ( $this->has_been_shown( self::PRODUCT_UPDATE_ACTION_NAME ) ) {
		return;
	}

	$this->enqueue_to_ces_tracks(
		array(
			'action'         => self::PRODUCT_UPDATE_ACTION_NAME,
			'label'          => __(
				'How easy was it to edit your product?',
				'woocommerce'
			),
			'onsubmit_label' => $this->onsubmit_label,
			'pagenow'        => 'product',
			'adminpage'      => 'post-php',
			'props'          => array(
				'product_count' => $this->get_product_count(),
			),
		)
	);
}