• Resolved A A Yusuf

    (@abeyii)


    Hi,

    The new WooCommerce version (V 7.2.0) have issue with my custom php function code snippet. I used a code to hide quantity field from the product page and elsewhere, but this new Version 7.2.0 WooCommerce didn’t let it work.

    Screenshot by Lightshot (prnt.sc) – Open the screenshot and see the button there.

    This is the code I used;

    add_filter( 'woocommerce_is_sold_individually', 'my_remove_quantity_fields', 10, 2 );
    function my_remove_quantity_fields( $return, $product ) {
        return true;
    }

    I strongly suggest WooCommerce should add the feature of enabling and disabling the visibility of quantity field in their next version. Since WooCommerce allow selling of digital products, why does the quantity field still appear without option to disable it.

Viewing 3 replies - 1 through 3 (of 3 total)
  • HI @abeyii

    Thanks for reaching out and I apologize for the delayed response.

    I understand that the code above did not work after updating the plugin to version 7.2.0, is that correct?

    I did some research and found the code snippet on this article worked on my site.

    I strongly suggest WooCommerce should add the feature of enabling and disabling the visibility of quantity field in their next version. Since WooCommerce allow selling of digital products, why does the quantity field still appear without option to disable it.

    I would suggest you raise this as an enhancement of the plugin here: Enhancement Request

    Hope this helps!

    Hi @abeyii

    I’m glad you were able to find a solution to your inquiry here and thanks for sharing it with the community too! ??

    I will be marking this thread as resolved. Should you have further inquiries, kindly create a new topic here.

    Thanks!

    Hi there @abeyii

    As I understand, this issue was discussed here, and merged with WooCommerce version 7.4.0 – the latest available, since a few days ago.

    Feel free to update to it and let us know how it goes.

    cc @devpar @mmoovs @goch @mikeemvee

    Thank you all for chiming in, kindly update your WooCommerce version to the latest and let us know how that goes.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Hide WooCommerce Quantity Field’ is closed to new replies.