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 (null).

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 8.6.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,
			'title'          => __(
				'How easy was it to edit your product?',
				'woocommerce'
			),
			'firstQuestion'  => __(
				'The product update process is easy to complete.',
				'woocommerce'
			),
			'secondQuestion' => __(
				'The product update process meets my needs.',
				'woocommerce'
			),
			'onsubmit_label' => $this->onsubmit_label,
			'pagenow'        => 'product',
			'adminpage'      => 'post-php',
			'props'          => array(
				'product_count' => $this->get_product_count(),
			),
		)
	);
}