Title: Cart Problem ?wc-ajax=get_refreshed_fragments
Last modified: November 1, 2024

---

# Cart Problem ?wc-ajax=get_refreshed_fragments

 *  [dantecapelli](https://wordpress.org/support/users/dantecapelli/)
 * (@dantecapelli)
 * [1 year, 5 months ago](https://wordpress.org/support/topic/cart-problem-wc-ajaxget_refreshed_fragments-3/)
 * I have a problem. After adding an item to the cart and clicking on the cart icon,
   it redirects to a page:
   [https://dantecapelli.com.br/?wc-ajax=get_refreshed_fragments](https://dantecapelli.com.br/?wc-ajax=get_refreshed_fragments)
 * The correct page would be:
   [https://dantecapelli.com.br/carrinho/](https://dantecapelli.com.br/carrinho/)
 * How can I solve this? I tried updating the plugins, etc., but I don’t know how
   long I’ve had this problem. I saw in a topic that the guy had the same problem
   but with the Astra theme, it was solved after updating the theme. ([https://wordpress.org/support/topic/wc-ajaxget_refreshed_fragments-9/](https://wordpress.org/support/topic/wc-ajaxget_refreshed_fragments-9/))
 * Has anyone else had this problem? Do you know how to solve it?
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fcart-problem-wc-ajaxget_refreshed_fragments-3%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 3 replies - 1 through 3 (of 3 total)

 *  [Shahin](https://wordpress.org/support/users/skalanter/)
 * (@skalanter)
 * [1 year, 5 months ago](https://wordpress.org/support/topic/cart-problem-wc-ajaxget_refreshed_fragments-3/#post-18108899)
 * Hello [@dantecapelli](https://wordpress.org/support/users/dantecapelli/),
 * Thank you for reaching out,
 * Before everything, it is better to ask your questions in one place for each topic.
   I saw you posted it in other places.
 * Regarding the issue you have raised on this topic, I fully examined it and couldn’t
   see it on my end also, we have not received any similar reports so far.
 * Here is the screenshot: [https://postimg.cc/vxyy65MP](https://postimg.cc/vxyy65MP)
 * It could be related to your customizations(like PHP codes in the child theme 
   or some JS in your website), or third-party plugins.
 * If you think there is an issue with our products, please tell us how to reproduce
   the issue. This will help us recreate the problem outside of your website and
   provide a solution to solve it, but currently, we have no report like this and
   we couldn’t reproduce it on our end.
 * You can upload your files using one of the following online services:
    [https://postimages.org](https://postimages.org)
   [https://imgbb.com](https://imgbb.com) [https://loom.com](https://loom.com) [https://drive.google.com](https://drive.google.com)
 * By the way, the reason behind this issue could be one of the following:
 * 1. Default theme files have been altered to perform modifications. Did you or
   your developer make any changes?
 * 2. Custom code has been added using snippet plugins or by editing default theme
   files. Was something like this done on your website? I see several tracking scripts
   that are currently blocked.
 * 3. A third-party plugin may be causing the problem. To troubleshoot, disable 
   all plugins (except WooCommerce) one by one, clear the cache each time, and check
   for the issue after each deactivation.
 * **Note:** Since you’re using many third-party plugins, I recommend testing this
   on a staging site first.
 * Looking forward to your feedback.
    I hope it helps. Best Regards
 *  Thread Starter [dantecapelli](https://wordpress.org/support/users/dantecapelli/)
 * (@dantecapelli)
 * [1 year, 5 months ago](https://wordpress.org/support/topic/cart-problem-wc-ajaxget_refreshed_fragments-3/#post-18109963)
 * I got a workaround by doing the following:
 *     ```wp-block-code
       add_action('wp_footer', 'dc_fix_mini_cart_redirect');function dc_fix_mini_cart_redirect() {if (is_cart()) {return;}?><script type="text/javascript">jQuery(function($) {// Altera o link de "Ver Carrinho" no mini carrinhofunction updateCartButton() {var cartButton = $('.woocommerce-mini-cart__buttons .button.wc-forward');cartButton.attr('href', "<?php echo wc_get_cart_url(); ?>"); // Define o link corretocartButton.off('click touchstart').on('click touchstart', function(e) {e.preventDefault(); // Previene o comportamento AJAXwindow.location.href = "<?php echo wc_get_cart_url(); ?>"; // Redireciona para a página de carrinho correta});}// Executa a função de atualização ao carregar a página e após atualizações AJAX do WooCommerce$(document.body).on('wc_fragments_refreshed wc_fragments_loaded', updateCartButton);// Executa a função de atualização inicial ao carregar a páginaupdateCartButton();});</script><?php}
       ```
   
 * It’s not a correct solution but it works for now
    -  This reply was modified 1 year, 5 months ago by [dantecapelli](https://wordpress.org/support/users/dantecapelli/).
 *  [Shahin](https://wordpress.org/support/users/skalanter/)
 * (@skalanter)
 * [1 year, 5 months ago](https://wordpress.org/support/topic/cart-problem-wc-ajaxget_refreshed_fragments-3/#post-18112820)
 * Thank you for the update,
    I’m glad you found a solution.
    -  This reply was modified 1 year, 5 months ago by [Shahin](https://wordpress.org/support/users/skalanter/).

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Cart Problem ?wc-ajax=get_refreshed_fragments’ is closed to new replies.

 * ![](https://i0.wp.com/themes.svn.wordpress.org/oceanwp/4.1.5/screenshot.png)
 * OceanWP
 * [Support Threads](https://wordpress.org/support/theme/oceanwp/)
 * [Active Topics](https://wordpress.org/support/theme/oceanwp/active/)
 * [Unresolved Topics](https://wordpress.org/support/theme/oceanwp/unresolved/)
 * [Reviews](https://wordpress.org/support/theme/oceanwp/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: [Shahin](https://wordpress.org/support/users/skalanter/)
 * Last activity: [1 year, 5 months ago](https://wordpress.org/support/topic/cart-problem-wc-ajaxget_refreshed_fragments-3/#post-18112820)
 * Status: not resolved