WC_Products_Tracking::possibly_add_attribute_tracking_scripts()
Adds the tracking scripts for product attributes filtering actions.
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_attribute_tracking_scripts( $hook );
- $hook(string) (required)
- Page hook.
WC_Products_Tracking::possibly_add_attribute_tracking_scripts() WC Products Tracking::possibly add attribute tracking scripts code WC 9.3.1
public function possibly_add_attribute_tracking_scripts( $hook ) { // phpcs:disable WordPress.Security.ValidatedSanitizedInput.InputNotSanitized, WordPress.Security.NonceVerification if ( 'product_page_product_attributes' !== $hook || ! isset( $_GET['page'] ) || 'product_attributes' !== wp_unslash( $_GET['page'] ) ) { return; } // phpcs:enable WCAdminAssets::register_script( 'wp-admin-scripts', 'attributes-tracking', false ); }