• Resolved jonroc804

    (@jonroc804)


    Hi, is it possible to have an action to show the woocommerce button at the end of the timer instead of hiding it? For “going on sale soon” promotions.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Thread Starter jonroc804

    (@jonroc804)

    Any thoughts on this?

    Plugin Author Nabil Lemsieh

    (@nlemsieh)

    Hello @jonroc804

    Sorry for the delayed response.

    While this isn’t possible out-of-the-box, you can still use the action hook below to show the add to cart button when timer reaches zero:

    
    add_action('hurryt_9999_campaign_ended', function(){
    // show add to cart button
    });
    

    To help you with the code that show the button, please reply with more details on what are you’re trying to accomplish.

    Best,
    – Nabil

    Thread Starter jonroc804

    (@jonroc804)

    With your above code, I was hoping something like this would work, making it purchasable after the time went off?

    add_filter( ‘woocommerce_is_purchasable’, ‘__return_false’);

    add_action('hurryt_239_campaign_ended', function(){
    add_filter( 'woocommerce_is_purchasable', '__return_true');
    });
    
    Plugin Author Nabil Lemsieh

    (@nlemsieh)

    Hello @jonroc804

    Did the code above work for you?
    Let me know if need help with that.

    Best,
    – Nabil

    Plugin Author Nabil Lemsieh

    (@nlemsieh)

    Hello,
    I’m going to mark this thread as resolved. Feel free to reply or open a new ticket if you still need help.

    Best
    – Nabil

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Show Add to Cart Button’ is closed to new replies.