• Resolved Web Expert

    (@seldimi)


    Hello.

    It would be handy if you could add an apply_filters on wcmmq_set_min_qt_in_shop_loop() function, because, in some cases some other plugins or WooCommerce native adds data-product-id and rel=nofollow on the link for add to cart, making the page invalid in w3c and we have to edit the plugin file on every update.

    I’m referring to line: 557 on set_max_min_quantity.php

    Thanks

    • This topic was modified 3 years ago by Web Expert.
Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Saiful Islam

    (@codersaiful)

    Dear @seldimi, I am working for this issue. I will let you know asap.
    Thanks

    • This reply was modified 3 years ago by Saiful Islam. Reason: spelling mistake
    Plugin Contributor UnikForce

    (@unikforce)

    Here is the filter that we added to customize the button attribute.

      $cart_btn_attr = array(
            'href' => esc_url( $product->add_to_cart_url() ),
            'title' => esc_attr( WC_MMQ::getOption( WC_MMQ_PREFIX . 'min_qty_msg_in_loop' ) . " " .$args['quantity'] ),
            'quantity' => esc_attr( isset( $args['quantity'] ) ? $args['quantity'] : 1 ),
            'class' => esc_attr( isset( $args['class'] ) ? $args['class'] : $class ),
            'product_id' => $product_id,
            'rel' => 'nofollow',
            'attributes' => isset( $args['attributes'] ) ? wc_implode_html_attributes( $args['attributes'] ) : '',
            'text' => esc_html( $product->add_to_cart_text() ),
        );
    
        $cart_btn_attr = apply_filters( 'wcmmq_cart_button_attr_in_loop', $cart_btn_attr );

    Thanks

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Duplicate data-product_id and rel=nofollow’ is closed to new replies.