woocommerce_get_script_data

The woocommerce woocommerce get script data hook.

Published Date - May 18, 2021

Description

return apply_filters( 'woocommerce_get_script_data', $params, $handle );

Parameters

  1. $params

  2. $handle


Usage

The following example is for adding a hook callback.

// define the woocommerce_get_script_data callback 
function custom_woocommerce_get_script_data( $params, $handle ){ 
   //custom code here
    return $params
} 

//add the action 
add_filter('woocommerce_get_script_data', 'custom_woocommerce_get_script_data', 10, 2)

Defined

The filter is defined in the following location(s).

woocommerce/includes/class-wc-frontend-scripts.php

return apply_filters( 'woocommerce_get_script_data', $params, $handle );