Skip to content

Instantly share code, notes, and snippets.

@bryceadams
Created February 5, 2015 14:07
Show Gist options
  • Save bryceadams/3c680f5bf7359cae1c27 to your computer and use it in GitHub Desktop.
Save bryceadams/3c680f5bf7359cae1c27 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() ) {
switch( $key ) {
case 0:
unset( $rule );
break;
default:
break;
)
}
}
return $rules;
}
//unset( $rules['0'] ); // WC_AF_Rule_Country
//unset( $rules['1'] ); // WC_AF_Rule_Billing_Matches_Shipping
//unset( $rules['2'] ); // WC_AF_Rule_Temporary_Email
//unset( $rules['3'] ); // WC_AF_Rule_Free_Email
//unset( $rules['4'] ); // WC_AF_Rule_International_Order
//unset( $rules['5'] ); // WC_AF_Rule_High_Value
//unset( $rules['6'] ); // WC_AF_Rule_Detect_Proxy
//unset( $rules['7'] ); // WC_AF_Rule_Ip_Location
//unset( $rules['8'] ); // WC_AF_Rule_First_Order
//unset( $rules['9'] ); // WC_AF_Rule_Ip_Multiple_Order_Details
//unset( $rules['10'] ); // WC_AF_Rule_Velocities
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment