You can try using template_redirect
action hook to check if the current page is product page and after that, you can redirect the user to your shop page.
Paste this code into your functions.php
add_action('template_redirect','custom_shop_page_redirect');
function custom_shop_page_redirect(){
if (class_exists('WooCommerce')){
if(is_product()){
wp_redirect(home_url('/shop/'));
exit();
}
}
return;
}
I have not tested it, but hope it will work for you.
Related Posts:
- how to use wc_create_order with subscription product
- Is it possible to add custom fields to a WooCommerce attribute term? [closed]
- Add custom variable to cart content [closed]
- WooCommerce changes lost password reset link
- Woocommerce My Account Endpoint – how to get ID parameter from URL?
- Default woocommerce placeholder image
- WooCommerce: Add New Report Tab
- How to add Woocomrce cart page shipping calculator to my country state list
- Custom Woocommerce image size [closed]
- Migrate WooCommerce Orders [closed]
- Button to update order status Woocommerce with WC Marketplace
- WooCommerce Subscriptions: Show monthly Price for annual Product
- WooCommerce: display text instead of raw checkbox value email
- How to add multiple product gallery images from front-end
- WooCommerce WebHook Retry
- Can I set a custom “alt” attribute with woocommerce_get_product_thumbnail()?
- Remove all Span Tags and class From Woocommerce Price [closed]
- Importing Woocommerce products with variations
- Woocommerce login not working on the first try
- WOO-Commerce translation | Tried it all [closed]
- Is there a way to show Single Variation prices in the product loop when filters or attributes are active?
- WooCommerce: “account is already registered with your email address”
- Enter name and email on the Product page and keep the input data on the Checkout page
- Separeting product from post in search result
- Woocommerce: Same gross price for different tax rates [closed]
- add shoppy.gg to woocommerce instead of add to card [closed]
- List of shipping on product page [closed]
- How to edit T&C checker text in Woocommerce checkout page? gettext?
- What is the reason for two classes storefront_woocommerce and storefront
- Get email type inside email template – order emails
- Caption not showing with Woo commerce thumbnails
- Change the Title Tag of Search Products Page
- Confirm Password on checkout page not working in woocommerce 3.0.1
- Woocommerce’s add_to_cart function returns false and doesn’t add anything to the cart [closed]
- How to check woocommerce single product tag
- In WooCommerce can you make a list of ‘steps’ for quantity increase? [closed]
- Send email notifications to a defined email address depending if a product in order has a specific TAG [closed]
- Adding author option to [products] woocommerce shortcode
- Set dynamic Options array in woocommerce_form_field
- WooCommerce product title formatting
- Colour of selected radio button seems backwards in Twenty Seventeen + Woocommerce
- How to modify WooCommerce button text in default and additional languages
- How to hide URL for downloadable product in WooCommerce? [closed]
- Customizing WooCommerce
- Get Post ID from attachment ID (Redirect to product page)
- WooCommerce set a min order price for a single country [closed]
- “Reset my password” links to itself (page refreshes) [closed]
- Woocommerce custom taxonomy filtering
- Woocommerce product tab is not showing probably
- How to list best seller products in woocommerce
- Updating failed. The response is not a valid JSON response. Gutenberg + Woocommerce Products
- Add product image to Woocommerce downloads page
- How to check if woocommerce_order_item_name is use in email?
- Sharing data between filters on a snippet (user specific) for Woocommerce
- How to add custom checkboxes from loop to WooCommerce product variation options?
- Restrict product tags archive to certain users
- Logo showing on some page but not on product categories pages
- Woocommerce doesn’t work with theme, header missing and css messed up
- Woocommerce Product Variation – Add Price Logic
- Display related product categories by subcategory
- Woocommerce Multisite global search how to mod ajax function?
- How to let users create lists of woocommerce products?
- How to force Woocommerce to deliver the product to the paypal adress which was used?
- Order again Woocommerce inside View Order
- Photo cover in WooCommerce
- How to vary WooCommerce product prices based on order dates
- How to save one API response to WooCommerce order meta data
- WooCommerce and ACF: How to Redirect Upon Add to Cart – Partially Working Example
- Woocommerce: Search by custom attribute
- How to fix: “The resource you are looking for has been removed, had its name changed, or is temporarily unavailable.” after malware cleaning
- Can’t update WooCommerce payment method title
- Set Post Thumbnail to external URL
- Custom theme woocommerce product detail page template not working
- Increase the download speed of a large number of variations in WooCommerce
- remove add to cart for free (0 $) product woocommerce
- WooCommerce related products load random posts per page
- WooCommerce: Adding a setup fee to certain products
- Removing shipping for one product with coupon
- Awesome Support Custom Field for show Woocommerce orders
- Site with WooCommerce section moved to HTTPS – all pages except home and main store are 404s
- Multiple quantities with options
- How to adjust Related Page Thumb Sizes on single page?
- Adding more than one item to Woocommerce cart
- Woocommerce – get product in category with specific attribute
- Woocommerce make appear when items added to cart
- How can I display one product using WooCommerce
- How do I change the woocommerce product gallery to show all thumbnails instead of three at a time in a carousel?
- How to add a menu page for options in wordpress for user that has the role of vendor?
- Testimonials/Reviews for Products
- add custom menu in woocommerce dashboard [closed]
- Turkish Character Problem on mailing
- WooCommerce: Order Details Table > Add Product Meta
- Override function
- How to disable schema from Wocommerce? [closed]
- Updating order meta to have a meta entry from an item in the order
- Adding a column to woocomerce admin order page that can be sorted
- WordPress error
- Auto generating API keys using the Application Authentication Endpoint [closed]
- Is there a way to conditionally check if i’m on product variation page url like mydomain.com/myproduct?attribute_pa_color=red
- Add custom ID to WooCommerce product tab