Looks like this is what is keeping it as only loading on Shop but when I take it out that doesn’t work
can I repeat this function with ‘is_product-category’?
/**
* Load scripts only in shop page
*/
if ( function_exists( 'is_shop' ) && is_shop() ) {
wp_enqueue_script( 'wd-tooltip-script', WD_URL . 'assets/js/jquery.tooltipster'. $min .'.js', array( 'jquery' ), WD_VERSION_NUM, true );
wp_enqueue_script( 'wd-custom-script', WD_URL . 'assets/js/custom'. $min .'.js', array( 'jquery' ), WD_VERSION_NUM, true );
wp_localize_script( 'wd-custom-script', 'custom_values', array(
'ajaxurl' => admin_url( 'admin-ajax.php' ),
'token' => wp_create_nonce( 'get_product_nonce' )
));
}
echo "<style>.hidden{display:none;}</style>";
}
Plugin Author
Rohil
(@rohilmistry)
Hi localbruce,
I would suggest you to add one condition that will check both is_product_archive as well.
As currently there are no plans to update, you can go in that way. In future update, I will provide option for shop and product archive page as well.
Thanks.