Paste this code into your functions.php
and it will be solved.
add_action('add_to_cart_redirect', 'resolve_dupes_add_to_cart_redirect');
function resolve_dupes_add_to_cart_redirect($url = false) {
if(!empty($url)) { return $url; }
return get_bloginfo('wpurl').add_query_arg(array(), remove_query_arg('add-to-cart'));
}
Related Posts:
- Where do I find the functions triggered within a hook?
- Pagination & get_pages?
- Writing Clean WooCommerce Styles
- Any tag pagination page (except the 1st page) loads index.php template instead of tag.php
- Cannot update WordPress General Settings Site Title and Tagline
- How do I update WooCommerce template files in my theme? [closed]
- How WordPress converts URL to $query_string
- Adding default pagination to wordpress loop
- Unhook action from child theme
- A mystery 300px image size
- WordPress with broken paging page 3
- How to call WooCommerce update cart function programatically
- paged > max_num_pages won’t throw 404
- Conditional statement to show pagination
- How to override checkbox styles if these inputs have a unique id [closed]
- Custom Field created in add_meta_boxes reappearing itself again in the default Custom Metabox
- How to add material design css in wordpress and woocommerce
- Storefront child theme not applying parent theme [closed]
- StoreFront product pages: Turn the Short Description section into a kindred tab section [closed]
- How can I fetch the WordPress cart errors normally displayed in woocommerce-error?
- page.php dependent sites are not working in custom woocommerce theme
- Zoom on custom theme without child
- Scroll to position on page for category pages only — woocommerce
- Can’t remove DIV from hooks in Storefront child theme [closed]
- Integrate WooCommerce theme with a WordPress theme [closed]
- What is the diferences between pure WordPress theme and Woocommerce theme? [closed]
- pagination for a custom loop with multiple post types
- How can I use the WordPress Loop and Pagination in multiple instances but different scenarios throughout my site?
- why mytheme/single-product.php works but not mytheme/woocommerce/single-product.php
- What template file is used for homepage pagination?
- Why does admin-ajax load slow and what are ways to speed it up?
- Adding an external link to product grid list pages for woocommerce
- Issue when posting updates/changes to wordress
- Want to add cart and a search bar in the right of logo line
- Woocommerce Product attribute not imported with wordpress Importer [closed]
- Pagination fuction in shortcode always displays on top
- Pagination not working on custom post page
- Add a field to the taxonomy editor?
- Pagination and multiple loops
- How to know if I am on 1st page
- how to add a badge on product based on filter?
- Pagination don’t work with active filters
- Woocommerce AJAX filters option loading spiner – problem on mobile device
- How do I make my terms for each product display via foreach loop? (woocommerce)
- White screen of death on index.php page 3 and above?
- Best way to declare product variables in woocommerce theme development?
- Alter shop page lay-out in OceanWP theme
- How to implement pagination in category.php template
- Problem with pagination link (error 404)
- Is it possible to echo a woocommerce prouct attribute discription?
- Custom post type query with pagination doesn’t work
- the_content() not displaying description correctly
- How to Show Next, Previous, and Page Numbers with wp_link_pages
- Woocommerce REST API for my account & checkout process
- Edit Product Archive design for Woo theme
- How to show Custom Field Value in Woocommerce Shop Page
- how to edit woocommerce checkout page
- How to fix a conflict cause by my theme with Woocommerce and/or Gravity Forms?
- control posts order by select option
- WooCommerce – edit templates
- Second page of archive is empty
- How to Apply Category Filter to Pagination
- Woocommerce Theme Reviews / Comments
- How does offset works on pagination? (get_results)
- Paginated WP_Query doesn’t return 404’s, even when posts don’t exist
- Pagination issue with Single.php
- php file child theme directory not overriding parent theme php file [duplicate]
- pagination/prev and next page links not showing
- WooCommerce custom query and paging: Not Found error
- How to change order of elements using a child theme
- How to install Woocommerce without plugin?
- How can i move my product name & price from below thumbnail to be the rollover content in Avada & Woocommerce?
- Cart button not working on mobile version [closed]
- Add text when displying attribute with a hook on single product page
- How to enable wc_add_to_cart_message?
- Custom add to cart does not work well only on the first time
- Trying to create a cutom query with pagination and page 2 breaking. Any help?
- WooCommerce custom add to cart buttons does not add products to cart if you’re logged out
- Menu items description? Custom Walker for wp_nav_menu()
- How to define and link full path to css located at a random folder on header.php
- Sizing screenshot.png without losing aspect ratio
- Software for WordPress Theme and Plugin Development? [closed]
- When to use is_home() vs is_front_page()?
- What is the preferred way to add custom javascript files to the site?
- Get the blog page URL set in Options
- How to create .pot files with POedit?
- How do I get the theme URL in PHP?
- Why when I submit a form in wordpress it loads a 404 page though URL is correct
- What is the constant WP_USE_THEMES for?
- Worthwhile to restrict direct access of theme files?
- How Do I Protect My Premium WordPress App Theme from Copying?
- How to detect mobile devices and present them a specific theme?
- Using wp_add_inline_style without a stylesheet
- How to add posts to custom menus?
- WordPress Theme Preview Image
- How To extend WP_Customize_Control
- What is the difference between front-page.php and home.php? [duplicate]
- How can I get page slug
- Does the functions.php file ever get called during an AJAX call? Debug AJAX
- When to use _e and __ for the translation?