Comments Gethin Jones started the conversationApril 1, 2021 at 3:11pmI'd like to be able to have products that aren't required to be deselected as default 767Janilyn repliedApril 2, 2021 at 7:57amHi Gethin, Thank you for contacting WPClever Support Forum. We’ve received your ticket and assigned one of our developers to help you with that. He’ll be looking into your question and responding with specific instructions as soon as possible. Please stay patient as we're having very heavy workloads, it might take some time for our developers to reach back. Best regards.Janilyn T. - WPClever Support Agent1 Like 153Henry repliedApril 2, 2021 at 8:09amHi Gethin,You can use this code:function wooco_products_first_check() { if ( is_product() ) { ?> <script> jQuery(window).load(function(){ if(jQuery(".wooco_components .wooco_component:not(.wooco_component_required) .wooco_component_product_checkbox input[type='checkbox']").length > 0){ jQuery(".wooco_components .wooco_component:not(.wooco_component_required) .wooco_component_product_checkbox input[type='checkbox']").prop('checked',false).change(); } });</script> <?php }}add_action( 'wp_footer', 'wooco_products_first_check');Best regards,Henry N.1 LikeGethin Jones repliedApril 8, 2021 at 9:35amBrill Sign in to reply ...
I'd like to be able to have products that aren't required to be deselected as default
Hi Gethin,
Thank you for contacting WPClever Support Forum.
We’ve received your ticket and assigned one of our developers to help you with that.
He’ll be looking into your question and responding with specific instructions as soon as possible.
Please stay patient as we're having very heavy workloads, it might take some time for our developers to reach back.
Best regards.
Janilyn T. - WPClever Support Agent
Hi Gethin,
You can use this code:
function wooco_products_first_check() {
if ( is_product() ) {
?>
<script>
jQuery(window).load(function(){
if(jQuery(".wooco_components .wooco_component:not(.wooco_component_required) .wooco_component_product_checkbox input[type='checkbox']").length > 0){
jQuery(".wooco_components .wooco_component:not(.wooco_component_required) .wooco_component_product_checkbox input[type='checkbox']").prop('checked',false).change();
}
});</script>
<?php
}
}
add_action( 'wp_footer', 'wooco_products_first_check');
Best regards,
Henry N.
Brill