This doesn’t sound like a bad approach to me. The thing to keep in mind about WP_CRON
is that it’s not a “real” cron and is only triggered when someone visits the site.
To that end, you could also do the check when the product page loads and hide the button as needed.
Related Posts:
- Site infected by link
- How to empty price of simple and variable product when product changed into out off stock
- Woocommerce – if selected attribute term equals
- split 1 cart item into instock and back ordered
- post_exists stops working in a scheduled event
- AJAX to add to cart multiple products woocommerce
- CRON job to update wp_usermeta value each day or week based on server time
- Adding product permalink on admin order page throwing error
- Make WooCommerce product categories only show images on homepage
- How do I remove an action hook inside a class that is called by another class?
- How to create loop inside wordpress function?
- ACF under category name in shop page [closed]
- Need to forward Data from WooCommerce Webhook sent to same site WordPress REST API custom endpoint
- Add Product Permalink in woocommerce admin order page
- Add Shortcode to ::before class
- Cron not sending wp-mail()
- Automatically delete posts one by one depending on published time
- How to override WooCommerce Order Item Meta with data from Cart?
- sessionStorage saves input value in browser but it is not loaded in the form field
- Woocommerce textarea format ignored
- How to auto-generate random numbers in username?
- i want add conditional for add category in wordpress
- Remove generated category and tag class names from woocommerce product & blog listings markup
- Adding a widget under an ‘Add to Cart’ button through a PHP snippet
- WooCommerce Quantity in Dropdown menu instead of clasic [closed]
- Php cron job (wp-cron) not working
- How to get total gross revenue for current month in the woocommerce dashboard status widget
- Use WP Cron to Clear a Page Cache?
- Add custom attribute to product’s HTML to woocommerce cart page
- Change WooCommerce template for PDF – access to custom field
- WooCommerce get products based on the taxonomy
- WP_Query To Display Product Of Brand On Taxonomy Page
- Woocommerce Add custom “Add to cart button” in single page with tags
- Reverse Cross-Sells (WooCommerce)
- Woocommerce remove menu item on myaccount dashboard
- How can i style “echo apply_filters”
- Hot to edit WooCOmmerce dashboard?
- How to echo a PHP code into WooCommerce variation product?
- How can I add another row to the total field in WooCoommerce cart, checkout and recipe mail?
- WooCommerce subcategories help
- Get Billing Email from WooCommece Checkout and Pass to Fullstory JS
- Woocommerce custom attributes list help
- WooCommerce multiple custom fields code
- Get all woocommerce product names with price and show using core php
- Search function not working
- loop to return tags in woocommerce in alphabetical order?
- Woocommerce Related Product by 2 taxonomy
- append data to mysql table via submit button coded in php – not working
- random woocommerce categories are not showing when count enabled?
- Add custom ID attribute to all woocommerce products on archive pages
- Put a span class in the shortened product title
- How to properly create multiple conditions to redirect users roles to different pages
- Add missing alt tag to featured images for “storefront” theme
- WooCommerce – Add Shipping class below each product in Shopping Cart page
- Hide price excluding tax when price is empty
- How to limit functionality of a woocommerce plugin to only certain user role?
- WooCommerce Custom Tab with ACF Repeater Field
- Update all posts in custom post types with wp_cron()?
- PHP – Woocommerce 3.2 Add variable shipping insurance with multiple “else if ” conditions
- How can i put php code on the wordpress page?
- Woocommerce variable products are being added to the card on the homepage (ajax)
- Display specific main Sub Nav on Woocommerce product pages
- How to have more than one ID included in the exclude command?
- Clone the “proceed to cart” button and place it above checkout on the cart page, but only appear display size is 320px
- I was wondering if it’s possible to implement card.js on WordPress
- wp_query beginner
- Global filter not working
- how to display woocomerce description of each category in wordpress? [closed]
- Use PHP code in Menu Admin Section
- Woocommerce variation with radio button + price
- WordPress 3.0 PHP Error – notice WordPress_product_Type was called incorrectly
- Display text of price (minus 20%) on every product page in a sentence.
- WooCommerce – Add product category below product price [closed]
- How to detect if a revision was made by woocommerce or wordpress?
- Need Quick Help With Product Category Page
- WooCommerce remove_action and add_action [closed]
- woocommerce plugin bugs
- Woocommerce custom field on emails outputs ‘Array’
- How do I prevent a folder from reappearing in my home directory?
- Display product attributes for current product
- jQuery doesn’t work in my php snippet
- Adding my own custom template page but got white page
- Getting the date_diff function return the difference in days
- WordPress using get_term to retreive slug not working as expected
- How do I routinely extract the thumbnail of the most recent post?
- Can’t make product images clickable
- How to remove image on single product and get product to span page?
- WooCommerce – Print Processing orders [closed]
- Use WP_Query Data In Cookie
- Woocommerce Price Text
- Hide cart when empty [closed]
- Need some help with tweaking a code for woocommerce [closed]
- Break a WordPress function to run in patches and re-continue
- WPMU schedule doesn’t execute actions
- How to execute add_action() function from custom plugin to Crontrol plugin or do_action()?
- How to add custom checkout field in user details mail template
- WooCommerce Custom Pagination
- How to set up and use a custom upload directory for post type ‘product’
- How to get the rating value of each comment
- Add specific phrase after every product title including the discounted price? [closed]