Please submit a private ticket if you need to share sensitive information, such as license details and admin credentials.

Okay
  Public Ticket #2738608
Can I uncheck an item as default option?
Closed

Comments

  • Gethin Jones started the conversation

    I'd like to be able to have products that aren't required to be deselected as default

  •  767
    Janilyn replied

    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

  •  153
    Henry replied

    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.

  • Gethin Jones replied

    Brill