Created
June 30, 2021 12:55
-
-
Save plugin-republic/f0f6df5fcb81ba79ee090b9faa7737bb to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Ignore discount on first x items in bulk rule | |
*/ | |
function prefix_bulk_adjusted_items( $quantity, $cart_item ) { | |
$ignore = 1; // Update the value here to equal the number of items that will not get discounted | |
return $quantity - $ignore; | |
} | |
add_filter( 'wcfad_bulk_adjusted_items', 'prefix_bulk_adjusted_items', 10, 2 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment