Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save plugin-republic/f888ea666e38b55afa303d8244f83d01 to your computer and use it in GitHub Desktop.
Save plugin-republic/f888ea666e38b55afa303d8244f83d01 to your computer and use it in GitHub Desktop.
<?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