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 | |
/** | |
* Programmatically alter the WooCommerce cart discount total (and apply a new discount) before it's calculated | |
* through the woocommerce_calculate_totals hook. | |
* | |
* For example, if you want to apply an arbitrary discount after a certain number of products in the cart, | |
* you can loop through that number and increment it as needed. | |
* | |
* In this example, I increment the discount by $8.85 after every 15 products added to the cart. | |
* |
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 | |
echo "my test gist"; | |
?> |