• Resolved webbbiz

    (@webbbiz)


    I have a scenario where I need to disable add to cart after Saturday to wednesday. I used the following code to do so:

    // Trigger Holiday Mode
    add_action ('init', 'woocommerce_holiday_mode');
    
    // Disable Cart, Checkout, Add Cart
    
    function woocommerce_holiday_mode() {
    if (date(D) ==( "Sat" || "Sun" || "Mon" || "Tues" || "Wed")){
    remove_action( 'woocommerce_after_shop_loop_item', 'woocommerce_template_loop_add_to_cart', 10 );
    remove_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_add_to_cart', 30 );
    remove_action( 'woocommerce_proceed_to_checkout', 'woocommerce_button_proceed_to_checkout', 20 );
    remove_action( 'woocommerce_checkout_order_review', 'woocommerce_checkout_payment', 20 );
    add_action( 'woocommerce_before_main_content', 'wc_shop_disabled', 5 );
    add_action( 'woocommerce_before_cart', 'wc_shop_disabled', 5 );
    add_action( 'woocommerce_before_checkout_form', 'wc_shop_disabled', 5 );
    }
    
    // Show Holiday Notice
    function wc_shop_disabled() {
    wc_print_notice( 'Our Online Shop is Closed Today :)', 'error');
    }
    }

    It worked perfectly until I designed my page with shopengine. Now it is not taking those codes, as those are for woocomerce. How to hook this with shopengine?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hi @webbbiz ,

    We are testing the hook issue on our end and soon we will get back to you with an update as soon as we have more information about it. Till then please stay with us.

    Regards,
    Benjir

    Benjir Ahmed

    (@benjirahmed)

    Hi @webbbiz ,

    Our development team is still checking this issue and trying to provide a solution for your problem. As this is not a usual problem, its taking longer time than usual. Hope you will get a solution soon.

    Regards,
    Benjir

    Benjir Ahmed

    (@benjirahmed)

    Hey @webbbiz ,

    Our development team has taken this feature as a module where you will put the weekly desired day and within the day the Shop will be closed for order as per your requirement. We will try to add this feature in our future update. Hope, that will also be helpful for others as well.

    Regards,
    Benjir

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘How to Hook to Shopengine’ is closed to new replies.