impress-org / givewp-snippet-library

A collection of code snippets to enhance or expand on the free Give WordPress Donation Plugin.
https://givewp.com
140 stars 90 forks source link

fix(form): develop per form currency snippet #72

Closed ravinderk closed 6 years ago

ravinderk commented 6 years ago

We already have a basic snippet: https://github.com/WordImpress/Give-Snippet-Library/blob/master/form-customizations/custom-per-form-currency.php

Note: Do not care about the report, earning and goal calculation with different currencies, but this snippet main goal to perform donation with currency other than base currency.

ToDo:

Tests:

Sidsector9 commented 6 years ago

I have tested the above tasks with this PR.

  1. Page with multiple forms with multiple currencies work as expected. Currencies are shown correctly.
  2. Form of type Set and Multi both work correctly. Currency is shown correctly.
  3. Donation listing page, donation details page and the logs all three show correct currency and value.

CC: @ravinderk