Blocking the checkout page result in 187 Pages has links to redirect 302

This topic has 4 replies, 3 voices, and was last updated 4 months, 1 weeks ago ago by Andrew Mitchell

  • Avatar: scrumgum
    scrumgum
    Participant
    July 17, 2024 at 13:34

    Hi there dear support team,
    Recently you helped me with cart popup bug, it seems that the current cart popup has a link to the checkout page that I edited as no follow no index, so I get many redirects.
    Where can I find the cart checkout button to edit the attribute to add rel=”nofollow” ?

    Thanks

    Please, contact administrator
    for this information.
    3 Answers
    Avatar: scrumgum
    scrumgum
    Participant
    July 17, 2024 at 13:55

    Adding this script to my child theme functions.php is the right thing to do?

    add_action(‘wp_footer’, ‘add_nofollow_to_checkout_button’);
    function add_nofollow_to_checkout_button() {
    if (is_cart()) {
    ?>

    Avatar: Rose Tyler
    Rose Tyler
    Support staff
    July 17, 2024 at 14:05

    Hello scrumgum,

    Thank you for getting in touch with us.

    Please try to use the next code in functions.php of the child theme:

    add_action('wp', function() {
    remove_action( 'woocommerce_widget_shopping_cart_buttons', 'etheme_woocommerce_widget_shopping_cart_proceed_to_checkout', 20 );
    add_action( 'woocommerce_widget_shopping_cart_buttons', 'etheme_child_woocommerce_widget_shopping_cart_proceed_to_checkout', 20 );
    }, 70);
    
    function etheme_child_woocommerce_widget_shopping_cart_proceed_to_checkout() {
    echo '<a href="' . esc_url( wc_get_checkout_url() ) . '" class="button btn-checkout wc-forward" rel="nofollow">' . esc_html__( 'Checkout', 'xstore' ) . '</a>';
    } 

    Warm Regards,
    The 8Theme Team

    Avatar: Andrew Mitchell
    Andrew Mitchell
    Support staff
    July 17, 2024 at 15:44

    Dear scrumgum,

    We hope you’re reveling in the experience our theme brings! Your enthusiasm is what fuels our passion. Would you be so kind as to channel that energy into a 5-star rating on ThemeForest? Your feedback is the spark that lights our way!

    Click here to spread the love: https://themeforest.net/downloads

    Thank you for being an integral part of our journey!

    Best Regards,
    The 8Theme Team

  • Viewing 4 results - 1 through 4 (of 4 total)

The issue related to '‘blocking the checkout page result in 187 Pages has links to redirect 302’' has been successfully resolved, and the topic is now closed for further responses

8theme customization service
We're using our own and third-party cookies to improve your experience and our website. Keep on browsing to accept our cookie policy.