Skip to content

Instantly share code, notes, and snippets.

@barrykooij
Created February 5, 2015 14:11
Show Gist options
  • Save barrykooij/a6be308dbc4b559d6da7 to your computer and use it in GitHub Desktop.
Save barrykooij/a6be308dbc4b559d6da7 to your computer and use it in GitHub Desktop.
add_filter( 'wc_anti_fraud_rules', 'wc_remove_antifraud_rules');
/**
* Remove unwanted anti-fraud rules
*
* @return array
*/
function wc_remove_antifraud_rules( $rules ) {
foreach ( $rules as $key => $rule ) {
if ( 'billing_matches_shipping' === $rule->get_id() ) {
unset( $rules[$key] );
}
}
return $rules;
}
@mcwe
Copy link

mcwe commented Aug 3, 2017

How do I add multiple rules into this snippet?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment