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

    (@skalanter)

    Hello @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

    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://imgbb.com
    https://loom.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

    (@dantecapelli)

    I got a workaround by doing the following:

    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 carrinho

    function updateCartButton() {

    var cartButton = $('.woocommerce-mini-cart__buttons .button.wc-forward');

    cartButton.attr('href', "<?php echo wc_get_cart_url(); ?>"); // Define o link correto

    cartButton.off('click touchstart').on('click touchstart', function(e) {

    e.preventDefault(); // Previene o comportamento AJAX

    window.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ágina

    updateCartButton();

    });

    </script>

    <?php

    }

    It’s not a correct solution but it works for now

    Thank you for the update,
    I’m glad you found a solution.

    • This reply was modified 3 weeks, 4 days ago by Shahin.
Viewing 3 replies - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.