WC_Admin_Setup_Wizard_Tracking::dequeue_non_allowed_scripts
Deprecated since 4.6.0. It is no longer supported and may be removed in future releases. It is recommended to replace this function with the same one.
Dequeue unwanted scripts from OBW footer.
Method of the class: WC_Admin_Setup_Wizard_Tracking{}
No Hooks.
Returns
null. Nothing (null).
Usage
$WC_Admin_Setup_Wizard_Tracking = new WC_Admin_Setup_Wizard_Tracking(); $WC_Admin_Setup_Wizard_Tracking->dequeue_non_allowed_scripts();
Changelog
| Deprecated since | 4.6.0 |
WC_Admin_Setup_Wizard_Tracking::dequeue_non_allowed_scripts() WC Admin Setup Wizard Tracking::dequeue non allowed scripts code WC 10.8.1
public function dequeue_non_allowed_scripts() {
_deprecated_function( __CLASS__ . '::' . __FUNCTION__, '4.6.0', __( 'Onboarding is maintained in WooCommerce Admin.', 'woocommerce' ) );
global $wp_scripts;
$allowed = array( 'woo-tracks' );
foreach ( $wp_scripts->queue as $script ) {
if ( in_array( $script, $allowed, true ) ) {
continue;
}
wp_dequeue_script( $script );
}
}