WC_Products_Tracking::possibly_add_product_import_scripts()publicWC 1.0

Adds the tracking scripts for product setting pages.

Method of the class: WC_Products_Tracking{}

No Hooks.

Return

null. Nothing (null).

Usage

$WC_Products_Tracking = new WC_Products_Tracking();
$WC_Products_Tracking->possibly_add_product_import_scripts( $hook );
$hook(string) (required)
Page hook.

WC_Products_Tracking::possibly_add_product_import_scripts() code WC 8.7.0

public function possibly_add_product_import_scripts( $hook ) {
	$product_screen = $this->get_product_screen( $hook );

	if ( 'import' !== $product_screen ) {
		return;
	}

	WCAdminAssets::register_script( 'wp-admin-scripts', 'product-import-tracking', false );

}