1. Home
  2. Knowledge Base
  3. WooCommerce Product Add-Ons Ultimate
  4. Multiply child product quantities by the product quantity
  1. Home
  2. Knowledge Base
  3. Advanced
  4. Multiply child product quantities by the product quantity

Multiply child product quantities by the product quantity

If you would like to multiply the quantity of child products by the main product quantity:

<?php
/**
* Multiply child product quantities by the product quantity
*/
function prefix_multiply_child_product_quantities( $multiply, $cart_item ) {
return true;
}
add_filter( 'pewc_multiply_child_product_quantities', 'prefix_multiply_child_product_quantities', 10, 2 );

Here’s how to add a snippet.

Was this article helpful?

Need More Support?

If you can't find the answer that you're looking for, then please use the link below to raise a support ticket.
Contact Support

Related Articles