A better approach in my opinion would be to redirect the cart and checkout pages to a static page with user friendly message.
This shows how to get Various WooCommerce Page URLs, you can hook a function to init
, that function will:
- See if the current URL matches the URL of the checkout or cart pages
- If so, it will
wp_redirect
to your static page.
Related Posts:
- How to get subscription key or id using Woocommerce Subscriptions [closed]
- How to enable specific plugin only based around shop manager role?
- Replacing a plugin function with a custom renamed function doesn’t work
- Redirect to another page using contact form 7? [closed]
- WordPress Stock Update Programatically
- Getting a ressource ID, from a WC_Order_Item_Product/Order
- Adding discount functionality to the cart
- How to assign a specific service to a specific provider based on location
- Easiest way to load/fire a handful of functions, IF checkbox is checked?
- Configuring default woo commerce login with modal popup
- Move related products after product summary? [closed]
- is_plugin_active() not defined on active plugin, in the thumbnails.php file
- Adding a script & php to functions.php
- Plugin update error message
- How to Loop Plugin Option Field Set?
- Can we completely remove the WordPress Sitemaps (WordPress 5.5)?
- Updating WooCommerce variable product stock issue
- Set a User as Author of all ‘New Posts’ posted
- Post source link plugin – small modification
- How to save Clicks of a download link button while it doesn’t matter if we refresh the page or again login/logout
- HELP: Integrating WP with raw PHP code once published button is hit
- How to redirect Old Post URL to new Post and keep Old post Comments?
- Modifying Footnote Plugin for Descriptive Title Attributes
- I would like to use create a function in my custom plugin to tell WP to use a different header
- Add multiple attributes to product from php
- bulk change of image setting “link to” to “link to: image url “
- How to get post URL in the_content filter?
- How can I display a contact form for out of stock products in WooCommerce?
- add_query_arg not working
- woocommerce 3.2.1 not sending order notification emails
- Executing my function once on a specific time
- WooCommerce Custom Product to checkout
- How to stop or remove an action being called inside a function of an extended class
- Theme my Login plugin, how to update fields
- Date calculations from 2 custom fields
- WooCommerce: Building a page with user input which is used to query order status and external API and return a result
- Adding a new field to the address field type in gravity forms
- WooCommerce specifc variations for specific user role [closed]
- Nested shortcode functions accessing variable
- Customize permalink wordpress category id
- Load Javascript from Plugin in One Page Only?
- Checking the count within a foreach loop
- wp_dequeue_script for a Plugin
- Need to replace Currency Shortforms
- wc_get_template new template does not showing up
- WooCommerce Shopping Cart Not Initially Showing Products [closed]
- Woocommerce singe product custom gallery output works just on the first slide
- How to include a custom field in the woocommerce email?
- How to translate wordpress error message
- Override a Plugin Function
- Api external with wordpress
- All custom widgets are not showing in widget area at the same time
- Add key and value to an array in another file
- How to change layout of shop page in wordpress? [closed]
- More gentle way to hook WordPress custom url
- Can you echo PHP code from a variable?
- How to get custom minimum price in Woocommerce
- Checkbox show / hide output result
- How to makes changes on the shop/category/tag pages but not on the product pages in woocommerce?
- how to validate input field in wordpress generated with wpform plugin
- implement custom roles in custom plugin
- How to get current cart values using WC_Shortcodes?
- Attempting to list all product categories and the price range of all products within them
- Creating an array from form inputs before it is posted to the options database
- Plugin which unlock free gift when you reach some amount in cart
- is there a way to display product gallery images via cdn
- Share my WordPress plugin for updating how?
- Custom Plugin: How to Include Install Buttons of other 3rd Party Plugins?
- adding dynamic/multiple slug values in ‘option_none_value’
- Submitting form to PHP
- Make modification of add_to_cart button specific to single page
- front end editor creation for Restropress plug in – displaying information from a WP admin area, on a different URL
- Google Maps for Woocommerce Checkout
- working code, not working – Plugin Dev
- redirect to a custom page
- How can I make the search bar in my wordpress site search all of the pages rather than just the blog posts?
- register_activation_hook doesn’t fire at all
- Nested DIV’s across functions in PHP, do not seem to work
- My ajax request don´t work and return 0
- Problem with conditional woocommerce custom checkout field
- How to allow customers to input a text as a product variation *and* charge per character?
- Create csv file in plugin
- Posting code inside the post instead of in the template file using shortcode
- Saving plugin data returns “You do not have sufficient permissions to access this page.”
- Metabox Data not saving
- How to add a handler for a button in plugin?
- Can anyone tell me why I can’t edit a plugin when it is installed without having to re-install?
- Including a PHP file via a function that is part of a plugin?
- How to disable register and reset the password from WordPress admin panel?
- How to tweak a plugin without preventing it from updating
- Adminimize Plugin — Is there an alternative to limiting Editor to ‘Appearance > Widgets’ only?
- Integrate Razorpay quick payments plugin with contact form7 plugin
- Woocommerce – Product Description heading [closed]
- Visual Composer Data Source?
- Populate Woocommerce order notes with custom field value
- Woocommerce Product Add-ons – Auto-select first option
- Translate text for empty product
- Option value not getting updated until page refresh in WordPress
- Make plugin admin page visible to other roles
- Sort posts by Date (DESC) and by ACF: active_inactive (ASC)