Advertisement
Guest User

Untitled

a guest
Jan 21st, 2017
113
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.77 KB | None | 0 0
  1. <?pp
  2.  
  3. /*
  4.  
  5. !!! Just a quick warning, if WooCommerce updates its plugin these changed will be gone !!!
  6.  
  7. 1) Find class-wc-eu-vat-number.php, it's located under wp-contents/plugins/woocommerce-eu-vat-number/includes
  8. 2) Skim trough until you find line 160
  9. 3) Do the following
  10. */
  11.  
  12. /* On line 160 you'll find this line of code */
  13. return new WP_Error( 'api', sprintf( __( 'VAT API Error: %s', 'woocommerce-eu-vat-number' ), $response->get_error_message() ) );
  14.  
  15. /* Replace line 160 with the following */
  16. if( strstr($response->get_error_message(), 'cURL error 28') !== false ){
  17. // fail silently and let order go through
  18. return true;
  19. } else {
  20. return new WP_Error( 'api', sprintf( __( 'VAT API Error: %s', 'woocommerce-eu-vat-number' ), $response->get_error_message() ) );
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement