=== WooCommerce PayPal Standard (multi account) ===
Requires at least: 4.0
Tested up to: 6.8.9
Tags: woocommerce, currency switcher, multiple currencies, multiple accounts
License: GPLv3

Allows to accept payments via PayPal, redirecting each payment to a specific PayPal account, depending on the currency in which the order was placed.

== Description ==

This plugin extends the standard PayPal payment method included with WooCommerce, allowing you to configure multiple PayPal accounts (one for each of the currencies enabled in the [Currency Switcher plugin](http://aelia.co/shop/currency-switcher-woocommerce/)). Whenever an order is placed in one of the currencies, the payment is automatically sent to the PayPal account associated to it. Thanks to this plugin, it becomes possible to send payments in EUR, USD, GBP and other currencies to separate accounts.

== Requirements ==

* WordPress 4.0 or newer.
* PHP 7.1 or newer.
* WooCommerce 3.0 or newer.
* [Currency Switcher 4.0.x or newer](https://aelia.co/shop/currency-switcher-woocommerce/).
* **Free** [Aelia Foundation Classes framework](https://aelia.co/downloads/wc-aelia-foundation-classes.zip) 2.0.1.180821 or newer (the plugin can install the framework automatically).

== Installation ==

1. Extract the zip file and drop the contents in the wp-content/plugins/ directory of your WordPress installation.
2. Activate the plugin through the 'Plugins' menu in WordPress.
3. Go to `WooCommerce > Settings > Checkout > Paypal (MultiAccount)`.
4. On the page, you will see multiple entries, labeled as follows:
	* PayPal Email for transactions in *<currency>*
	* Receiver Email for transactions in *<currency>*
	* PayPal Identity Token for transactions in *<currency>*
	Enter the details of the account to which you would like to direct the payments in the selected currency, and save the settings.
4. Configuration is now complete. Now payments will be automatically directed to the accounts you specified.

== Changelog ==

= 1.5.25.250918 =
* Declared compatibility with WooCommerce 10.2.

= 1.5.24.250806 =
* Declared compatibility with WooCommerce 10.1.

= 1.5.23.250714 =
* Declared compatibility with WooCommerce 10.0.
* Declared compatibility with Cost of Goods feature.

= 1.5.22.250617 =
* Declared compatibility with WooCommerce 9.9.

= 1.5.21.250414 =
* Declared compatibility with WooCommerce 9.8.
* Declared compatibility with WordPress 6.8.9.

= 1.5.20.250221 =
* Declared compatibility with WooCommerce 9.7.

= 1.5.19.250106 =
* Declared compatibility with WooCommerce 9.6.

= 1.5.18.241202 =
* Declared compatibility with WooCommerce 9.5.
* Declared compatibility with WordPress 6.7.9.

= 1.5.17.241007 =
* Declared compatibility with WooCommerce 9.4.

= 1.5.16.240910 =
* Declared compatibility with WooCommerce 9.3.

= 1.5.15.240807 =
* Declared compatibility with WooCommerce 9.2.

= 1.5.14.240709 =
* Declared compatibility with WooCommerce 9.1.

= 1.5.13.240606 =
* Declared compatibility with WooCommerce 9.0.

= 1.5.12.240514 =
* Declared compatibility with WooCommerce 8.9.

= 1.5.11.240414 =
* Declared compatibility with WooCommerce 8.8.

= 1.5.10.240307 =
* Declared compatibility with WooCommerce 8.7.
* Declared compatibility with WordPress 6.5.9.

= 1.5.9.240205 =
* Declared compatibility with WooCommerce 8.6.

= 1.5.8.240109 =
* Declared compatibility with WooCommerce 8.5.

= 1.5.7.231213 =
* Declared compatibility with WooCommerce 8.4.

= 1.5.6.231201 =
* Updated Composer dependencies.

= 1.5.5.231102 =
* Declared compatibility with WooCommerce 8.3.
* Declared compatibility with WordPress 6.4.x.

= 1.5.4.231003 =
* Updated supported WooCommerce versions.

= 1.5.3.230905 =
* Updated supported WooCommerce versions.

= 1.5.2.230809 =
* Updated supported WordPress versions.

= 1.5.1.230712 =
* Tweak - Handled edge case where the AFC is disabled, preventing the plugin from declaring support for the HPOS feature.

= 1.5.0.230703 =
* Added declaration of support for the HPOS feature..
* Updated supported WooCommerce versions.

= 1.4.25.230524 =
* Updated supported WooCommerce versions.

= 1.4.24.230503 =
* Updated supported WooCommerce versions.

= 1.4.23.230406 =
* Updated supported WooCommerce versions.
* Updated supported WordPress versions.

= 1.4.22.230315 =
* Updated supported WooCommerce versions.

= 1.4.21.230214 =
* Updated supported WooCommerce versions.

= 1.4.20.230109 =
* Updated supported WooCommerce versions.

= 1.4.19.221203 =
* Updated supported WooCommerce versions.

= 1.4.18.221110 =
* Updated supported WooCommerce versions.
* Updated supported WordPress versions.

= 1.4.17.221012 =
* Updated supported WooCommerce versions.

= 1.4.16.220830 =
* Updated supported WooCommerce versions.

= 1.4.15.220804 =
* Updated supported WooCommerce versions.

= 1.4.14.220704 =
* Updated supported WooCommerce versions.

= 1.4.13.220607 =
* Updated supported WooCommerce versions.

= 1.4.12.220502 =
* Updated supported WooCommerce versions.
* Updated supported WordPress versions.

= 1.4.11.220330 =
* Updated supported WooCommerce versions.

= 1.4.10.220224 =
* Updated supported WooCommerce versions.

= 1.4.9.220124 =
* Updated supported WooCommerce versions.

= 1.4.8.220104 =
* Updated supported WooCommerce versions.

= 1.4.7.211208 =
* Updated supported WooCommerce versions.
* Updated supported WordPress versions.

= 1.4.6.211102 =
* Updated supported WooCommerce versions.

= 1.4.5.211005 =
* Updated supported WooCommerce versions.

= 1.4.4.210906 =
* Updated supported WooCommerce versions.

= 1.4.3.210816 =
* Updated supported WooCommerce versions.
* Updated supported WordPress versions.

= 1.4.2.210622 =
* Updated supported WooCommerce versions.
* Updated supported WordPress versions.

= 1.4.1.210607 =
* Tweak - Renamed plugin, for naming consistency.
* Tweak - Updated Freemius integration. Added redirect link after activation and plugin icon.

= 1.4.0.210518 =
* Feature - Added configuration for automated build.
* Feature - Added Freemius integration.
* Updated supported WooCommerce versions.

= 1.3.17.210513 =
* Updated supported WooCommerce versions.

= 1.3.16.210406 =
* Updated supported WooCommerce versions.

= 1.3.14.210128 =
* Updated supported WooCommerce versions.
* Updated supported WordPress versions.

= 1.3.13.201207 =
* Updated supported WooCommerce versions.
* Updated supported WordPress versions.

= 1.3.12.201103 =
* Updated supported WooCommerce versions.

= 1.3.11.200904 =
* Updated supported WooCommerce versions.

= 1.3.10.201005 =
* Updated supported WooCommerce versions.
* Updated supported WordPress versions.

= 1.3.9.200904 =
* Updated supported WooCommerce versions.

= 1.3.8.200813 =
* Updated supported WordPress and WooCommerce versions.

= 1.3.8.200325 =
* Updated supported WooCommerce versions.

= 1.3.8.200306 =
* Updated supported WooCommerce versions.

= 1.3.7.200428 =
* Updated requirement checking class.
* Updated requirements.
* Updated supported WooCommerce versions.


= 1.3.6.200326 =
* Updated supported WooCommerce versions.

= 1.3.5.200309 =
* Updated supported WooCommerce versions.
* Updated requirements.

= 1.3.4.181220 =
* Feature - Added support for automatic updates.
* Fix - Removed warning message related to subscriptions.
* Updated supported WooCommerce versions.
* Updated requirements.

= 1.3.3.180413 =
* Tweak - Improved logic to fetch the PayPal email address during IPN verification.

= 1.3.2.171220 =
* Fix - Fixed refund logic in WooCommerce 3.2.6.

= 1.3.1.170308 =
* Improved compatibility with WooCommerce 2.7:
	* Replaced calls to `WC_Order::get_order_currency()` with `WC_Order::get_currency()`.
* Updated requirements.
* Updated requirement checking class.
* Improved compatibility with WordPress 4.7 and later. Added new logic to process the global `$wp_filter` variable.

= 1.3.0.160106 =
* Rewritten gateway for WooCommerce 2.4.x. WC 2.4 includes the improvements we submitted to make the PayPal gateway more extensible. The rewritten gateway takes advantage of such changes, simplifying the multi-account logic.

= 1.2.6.151208 =
* Fixed bug in `woocommerce_subscriptions_paypal_change_status_data` handler. Removed call to `WC_Gateway_Paypal_MultiAccount::obsolete get_order_from_subscriber_id()` method.

= 1.2.5.151020 =
* Added new filter `payment_status_completed_data`. This new filter will allow 3rd party to pre-process payment data before it's validated.

= 1.2.4.150903 =
* Removed unneeded code that raised some minor warnings.

= 1.2.3.150731 =
* Updated requirement checking class.

= 1.2.4.150630 =
* Refactored logic to validate IPN. Added mechanism to remove all references to the base IPN Handler class.

= 1.2.3.150610 =
* Fixed bug in IPN handling in WooCommerce 2.3.10. The bug was caused by incorrect references in base `WC_Gateway_Paypal_IPN_Handler` class, which caused the PayPal merchant email validation to fail. Ref. https://github.com/woothemes/woocommerce/pull/8348.

= 1.2.2.150519 =
* Refactored `WC_Gateway_Paypal_MultiAccount::woocommerce_subscriptions_paypal_change_status_data()`. The method now uses the order object passed to it by the Subscription plugin.
* Added `WC_Gateway_Paypal_MultiAccount::woocommerce_subscriptions_paypal_change_status_data()` method to PayPal gateway for WooCommerce 2.2 and earlier.

= 1.2.1.150515 =
* Improved support for Subscriptions. The plugin can now alter the API keys used by the Subscriptions plugin depending on the currency used to buy the subscription.
* Set requirements to WooCommerce 2.3.8. The plugin cannot work properly with WooCommerce 2.3.0 to 2.3.7 due to some issues in the core.
* Imported logic to use a single logger for all PayPal Standard classes in WooCommerce 2.3. Ref. https://github.com/woothemes/woocommerce/commit/33d94aaea46137a0d8366e9033e6bebd218333cc.

= 1.2.0.150506 =
* Added support for PayPal API settings in multiple currencies.
* Added support for refunds.

= 1.1.2.150422 =
* Rewritten PayPal Request, PDT and IPN classes to work with unpatched WooCommerce. This was necessary after the decision, from WooCommerce team, of not fixing the PayPal gateway in WC 2.3.x.

= 1.1.1.150420 =
* Fixed bug in `WC_Gateway_Paypal_IPN_Handler` class. The bug caused IPN validation to fail.

= 1.1.0.150319 =
* Added support for the complicated PayPal Standard gateway included with WC2.3:
	* Added new `WC_Gateway_Paypal_MultiAccount` class.
	* Added new `WC_Gateway_Paypal_Request` class.
	* Added new `WC_Gateway_Paypal_IPN_Handler` class.
	* Added new `WC_Gateway_Paypal_PDT_Handler` class.
* Updated requirements. Plugin now required WooCommerce 2.1, 2.2 or 2.3.8 and later.

= 1.0.8.150310 =
* Improved requirements checking. The new logic will prevent the plugin from crashing when the requirements are not met.

= 1.0.7.140903 =
* Packaged plugin for public release.

= 1.0.6.140318 =
* Added WC_Gateway_Paypal_MultiAccount::get_paypal_order() method.

= 1.0.5.140318 =
* Improved debug code.

= 1.0.4.140228 =
* Improved debug code.

= 1.0.3.140228 =
* Corrected PayPal notification URL.

= 1.0.2.140228 =
* Fixed bug in retrieving the default receiver email for a currency.
* Improved logging.

= 1.0.1.140227 =
* Improved debug mode.
* Corrected plugin name.

= 1.0.0.140227 =
* First release.

