• Resolved ddoddsr

    (@ddoddsr)


    I need to remove the qty field added by filter used to adjust ‘max_value’
    add_filter( ‘woocommerce_quantity_input_args’, array( $this, ‘quantity_input_args’ ), 10, 2 );

    I tried a remove_filter:

    remove_filter( ‘woocommerce_quantity_input_args’, [‘WC_Cart_Stock_Reducer’,’quantity_input_args’ ] , 10) ;

    Any suggestions?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author James Golovich

    (@jamesgol)

    If you are grabbing the object instance already (from your last post), you should be able to use that as the object reference passed.

    Otherwise you could walk the global $wp_filter and look for it, though probably not the best way to do it.

    Though I am curious why you would want to remove it.

    Thread Starter ddoddsr

    (@ddoddsr)

    That worked, of course to use the object reference and filter it at the same place i’m grabbing the object reference.
    In this case we are selling a registration to an event with the attendees names as a part of the variation. We only every want one of these for each name in the cart.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘How to make the quantity_input_args hidden’ is closed to new replies.