Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Hide PayPal buttons when currency is unsupported. #285
PayPal provides a list of supported currency codes.
Right 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.
The PayPal library 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.