{"action":"opened","issue":{"url":"https://api.github.com/repos/angelleye/paypal-woocommerce/issues/285","labels_url":"https://api.github.com/repos/angelleye/paypal-woocommerce/issues/285/labels{/name}","comments_url":"https://api.github.com/repos/angelleye/paypal-woocommerce/issues/285/comments","events_url":"https://api.github.com/repos/angelleye/paypal-woocommerce/issues/285/events","html_url":"https://github.com/angelleye/paypal-woocommerce/issues/285","id":103212822,"number":285,"title":"Hide PayPal buttons when currency is unsupported.","user":{"login":"angelleye","id":629241,"avatar_url":"https://avatars.githubusercontent.com/u/629241?v=3","gravatar_id":"","url":"https://api.github.com/users/angelleye","html_url":"https://github.com/angelleye","followers_url":"https://api.github.com/users/angelleye/followers","following_url":"https://api.github.com/users/angelleye/following{/other_user}","gists_url":"https://api.github.com/users/angelleye/gists{/gist_id}","starred_url":"https://api.github.com/users/angelleye/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/angelleye/subscriptions","organizations_url":"https://api.github.com/users/angelleye/orgs","repos_url":"https://api.github.com/users/angelleye/repos","events_url":"https://api.github.com/users/angelleye/events{/privacy}","received_events_url":"https://api.github.com/users/angelleye/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/angelleye/paypal-woocommerce/labels/enhancement","name":"enhancement","color":"84b6eb"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/angelleye/paypal-woocommerce/milestones/15","html_url":"https://github.com/angelleye/paypal-woocommerce/milestones/1.2.1","labels_url":"https://api.github.com/repos/angelleye/paypal-woocommerce/milestones/15/labels","id":1177116,"number":15,"title":"1.2.1","description":"","creator":{"login":"angelleye","id":629241,"avatar_url":"https://avatars.githubusercontent.com/u/629241?v=3","gravatar_id":"","url":"https://api.github.com/users/angelleye","html_url":"https://github.com/angelleye","followers_url":"https://api.github.com/users/angelleye/followers","following_url":"https://api.github.com/users/angelleye/following{/other_user}","gists_url":"https://api.github.com/users/angelleye/gists{/gist_id}","starred_url":"https://api.github.com/users/angelleye/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/angelleye/subscriptions","organizations_url":"https://api.github.com/users/angelleye/orgs","repos_url":"https://api.github.com/users/angelleye/repos","events_url":"https://api.github.com/users/angelleye/events{/privacy}","received_events_url":"https://api.github.com/users/angelleye/received_events","type":"User","site_admin":false},"open_issues":16,"closed_issues":0,"state":"open","created_at":"2015-06-23T11:07:54Z","updated_at":"2015-08-26T08:55:44Z","due_on":"2015-09-11T05:00:00Z","closed_at":null},"comments":0,"created_at":"2015-08-26T08:55:44Z","updated_at":"2015-08-26T08:55:44Z","closed_at":null,"body":"https://wordpress.org/support/topic/10401-order-total-is-invalid-for-unsupported-currencies?replies=5#post-7348027\r\n\r\nPayPal provides a [list of supported currency codes](https://developer.paypal.com/docs/classic/api/currency_codes/).\r\n\r\nRight now if the order is in this currency our plugin sends it to PayPal and returns the error that the currency is unsupported.  We should add logic to hide the PayPal buttons if the currency is unsupported so that we can avoid this error altogether.  \r\n\r\nThe [PayPal library](https://github.com/angelleye/paypal-php-library/blob/dev/src/angelleye/PayPal/PayPal.php) that we're using in this plugin has a $CurrencyCodes array included with it.  We should double check that it's still accurate with the list PayPal provides, and then it can be used to easily cross-reference in the code logic in order to hide buttons if the currency code is not in the list."}}