Skip to content

Instantly share code, notes, and snippets.

@digitalchild
Created September 27, 2021 04:14
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 digitalchild/f8567d4f277248ee15421f284bb06463 to your computer and use it in GitHub Desktop.
Save digitalchild/f8567d4f277248ee15421f284bb06463 to your computer and use it in GitHub Desktop.
Remove fixed product discounts from the vendor coupon edit screen for WC Vendors Pro dashboard
<?php
/**
* Remove fixed product discounts from the vendor coupon edit screen
*/
add_filter( 'wcv_coupon_discount_type', 'wcv_use_percentage_discount_type' );
function wcv_use_percentage_discount_type( $select_args ){
unset( $select_args['options']['fixed_product']);
return $select_args;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment