Repository Forums Support WooCommerce Extended Coupon Features PRO how to select 2 free products on products with 2 quantity Reply To: how to select 2 free products on products with 2 quantity

#4387
numep
Participant

ok so I read other posts and created a hack and added a INPUT type number so ADMIN can choose quantity of Free products using this code:

private function get_free_product_amount_for_coupon( $coupon ) {
		$coupon_qty = $this->get_quantity_products_value( $coupon );
		$coupon_multiplier_qty = $this->get_product_multiplier_value( $coupon );
		return apply_filters( 'wjecf_free_product_amount_for_coupon', ($coupon_qty > 0 ? $coupon_qty:$coupon_multiplier_qty ), $coupon ); // 2.3.3
	}

so now I would like to know a last question, can u help me out with a filter or code to add an ADDITIONAL free gift on a coupon? it should be 1 free product something like this $this->add_to_cart( 854, 1,'', '', $cart_item_data );