Created
March 16, 2024 12:51
-
-
Save plugin-republic/f888ea666e38b55afa303d8244f83d01 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 | |
/** | |
* Ensure tax isn't added to options with 'value only' | |
*/ | |
function prefix_check_tax_for_option_price( $check, $option_price, $item ) { | |
if( ! empty( $item['option_price_visibility'] && $item['option_price_visibility'] == 'value' ) ) { | |
return false; | |
} | |
return $check; | |
} | |
add_filter( 'pewc_check_tax_for_option_price', 'prefix_check_tax_for_option_price', 10, 3 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment