Skip to content

Instantly share code, notes, and snippets.

@rynaldos-zz
Last active February 3, 2017 08:10
Show Gist options
  • Save rynaldos-zz/7f58aca545053ffadda4bfd4278027c4 to your computer and use it in GitHub Desktop.
Save rynaldos-zz/7f58aca545053ffadda4bfd4278027c4 to your computer and use it in GitHub Desktop.
[WooCommerce] Remove the "WC_AF_Rule_Billing_Matches_Shipping" rule in anti-fraud Plugin
add_filter( 'wc_anti_fraud_rules', 'wc_remove_antifraud_rules');
function wc_remove_antifraud_rules( $rules ) {
foreach ( $rules as $key => $rule ) {
if ( 'billing_matches_shipping' === $rule->get_id() ) {
unset( $rules[$key] );
}
}
return $rules;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment