Advertisement
Guest User

Untitled

a guest
Apr 1st, 2015
199
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.00 KB | None | 0 0
  1. add_filter( 'wc_anti_fraud_rules', 'wc_remove_antifraud_rules');
  2.  
  3. /**
  4. * Remove unwanted anti-fraud rules
  5. *
  6. * @return array
  7. */
  8. function wc_remove_antifraud_rules( $rules ) {
  9.  
  10. foreach ( $rules as $key => $rule ) {
  11. if ( 'billing_matches_shipping' === $rule->get_id() ) {
  12. switch( $key ) {
  13. case 0:
  14. unset( $rule );
  15. break;
  16. default:
  17. break;
  18. )
  19. }
  20.  
  21. }
  22.  
  23. return $rules;
  24.  
  25. }
  26.  
  27. //unset( $rules['0'] ); // WC_AF_Rule_Country
  28. //unset( $rules['1'] ); // WC_AF_Rule_Billing_Matches_Shipping
  29. //unset( $rules['2'] ); // WC_AF_Rule_Temporary_Email
  30. //unset( $rules['3'] ); // WC_AF_Rule_Free_Email
  31. //unset( $rules['4'] ); // WC_AF_Rule_International_Order
  32. //unset( $rules['5'] ); // WC_AF_Rule_High_Value
  33. //unset( $rules['6'] ); // WC_AF_Rule_Detect_Proxy
  34. //unset( $rules['7'] ); // WC_AF_Rule_Ip_Location
  35. //unset( $rules['8'] ); // WC_AF_Rule_First_Order
  36. //unset( $rules['9'] ); // WC_AF_Rule_Ip_Multiple_Order_Details
  37. //unset( $rules['10'] ); // WC_AF_Rule_Velocities
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement