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 add posts to custom menus?
- How to remove search bar from a wordpress theme? [closed]
- How to: Update live sites theme from version control repo via plugin or library? [closed]
- Page attribute template dropdown not displayed even the syntax is correct
- How to add a text widget during theme activation
- WordPress Theme customisation CSS
- Theme check: Missing a text-domain
- Can I customize any WordPress parent block-based theme template files by child theme like a parent classic theme?
- How to determine if post has widget content?
- Set multiple templates per post
- Displaying recent post excerpts on static front page
- approach to pass additional parameter in post URL
- WordPress Media Uploader in page template (On Front-end)
- Replace function in a child theme
- How to register and enqueue JavaScript files without breaking plugin dependencies?
- Extract all shortcode data from post into loop variables?
- Adding the_content() return warning count()
- Ajax call returns 0 when add_action is inside a class in functions.php
- header, stylesheet not being read
- first excerpt fine, subsequent post excerpts shift to the right instead of displaying vertically [closed]
- Custom Post Types set up, how do I style the main slug page?
- How to register dynamic settings in WordPress Customizer?
- How to add audio files to audio player in WordPress custom theme?
- Data Validation & Sanitization for Big HTML Blocks
- How to determine if it is legal to remove credit link from theme?
- How to create sub-menu in “Allure Real Estate Theme for Placester”?