Automattic\WooCommerce\Internal\Admin

CustomerEffortScoreTracks::enqueue_ces_survey_for_new_product()privateWC 1.0

Enqueue the CES survey trigger for a new 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_new_product();

CustomerEffortScoreTracks::enqueue_ces_survey_for_new_product() code WC 9.3.3

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

	$this->enqueue_to_ces_tracks(
		array(
			'action'         => self::PRODUCT_ADD_PUBLISH_ACTION_NAME,
			'title'          => __(
				'How easy was it to add a product?',
				'woocommerce'
			),
			'firstQuestion'  => __(
				'The product creation screen is easy to use.',
				'woocommerce'
			),
			'secondQuestion' => __(
				'The product creation screen\'s functionality meets my needs.',
				'woocommerce'
			),
			'onsubmit_label' => $this->onsubmit_label,
			'pagenow'        => 'product',
			'adminpage'      => 'post-php',
			'props'          => array(
				'product_count' => $this->get_product_count(),
			),
		)
	);
}