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

Okay
  Public Ticket #2559860
Rules for complete store
Closed

Comments

  • evolve started the conversation

    Hi, could it be possible to create u rule that the complete store, all the products, are unpurchaseable, or hidden?

    With lots of products which all need to be set seperately, this is a major "mission". It would be nice to set 1 main rule for all products.

    Regards, Kai Gerards

  •  767
    Janilyn replied

    Hi Evolve,

    Unfortunately, our plugin doesn't support bulk edit, the timers must be manually set for individual products. 

    I will transfer your ticket to one of our developers to see if he can give you any workaround for this.

    Please be patient waiting for his response.

    Best regards.

    Janilyn T. - WPClever Support Agent

  •  1,226
    Dustin replied

    Hi Evolve,

    You can use the custom code, please add this code to current-theme (or child-theme)/ functions.php

    add_filter( 'woocommerce_is_purchasable', 'your_woocommerce_is_purchasable', 9, 2 );
    function your_woocommerce_is_purchasable( $purchasable, $product ) {
        return false;
    }

    It will set all products are unpurchasable by default, then you can work with the timer for each product.

    If you want to set hidden for all products, please use below code:

    add_filter( 'woocommerce_product_is_visible', 'your_woocommerce_product_is_visible', 9, 2 );
    function your_woocommerce_product_is_visible( $visible, $product_id ) {
        return false;
    }

    Best regards,
    Dustin

  • evolve replied

    Hi,

    Thanks for the reply, but that's not exactly what we are looking for.

    Some stores have onening-hours, and none of the products should be purchaseable during closing hours.
    Then, some stores (food-delivery) must have a option to set the all the products unpurchaseable with one click, but the products need to be visible.

    Thanks anyway,

    Regards, Kai