Version Description
Download this release
Release Info
Developer | jason_the_adams |
Plugin | Give – Donation Plugin and Fundraising Platform |
Version | 2.9.4 |
Comparing to | |
See all releases |
Code changes from version 2.9.3 to 2.9.4
- assets/dist/js/give-stripe.js +1 -1
- give.php +2 -2
- readme.txt +34 -22
- src/Revenue/Listeners/DeleteRevenueWhenDonationDeleted.php +9 -7
- src/Revenue/Migrations/AddPastDonationsToRevenueTable.php +10 -6
- src/Revenue/Repositories/Revenue.php +21 -9
- src/Revenue/RevenueServiceProvider.php +1 -1
- vendor/autoload.php +1 -1
- vendor/composer/InstalledVersions.php +6 -6
- vendor/composer/autoload_real.php +4 -4
- vendor/composer/autoload_static.php +4 -4
- vendor/composer/installed.php +6 -6
assets/dist/js/give-stripe.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
!function(e){var t={};function r(
|
1 |
+
!function(e){var t={};function r(i){if(t[i])return t[i].exports;var n=t[i]={i:i,l:!1,exports:{}};return e[i].call(n.exports,n,n.exports,r),n.l=!0,n.exports}r.m=e,r.c=t,r.d=function(e,t,i){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:i})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var i=Object.create(null);if(r.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)r.d(i,n,function(t){return e[t]}.bind(null,n));return i},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=498)}({10:function(e,t){function r(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}e.exports=function(e,t,i){return t&&r(e.prototype,t),i&&r(e,i),e}},498:function(e,t,r){e.exports=r(887)},8:function(e,t){e.exports=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}},887:function(e,t,r){"use strict";r.r(t);var i=r(8),n=r.n(i),a=r(10),l=r.n(a),o=function(){function e(t){n()(this,e),t&&(this.formElement=t,this.publishableKey=t.getAttribute("data-publishable-key"),this.accountId=t.getAttribute("data-account")?t.getAttribute("data-account"):"",this.idPrefix=t.getAttribute("data-id")?t.getAttribute("data-id"):"",this.locale=give_stripe_vars.preferred_locale,this.fieldsFormat=give_stripe_vars.cc_fields_format,this.isSingleInputField="single"===this.fieldsFormat,this.isMounted=!1,this.fontStyles=[],0!==Object.keys(give_stripe_vars.element_font_styles).length&&this.fontStyles.push(give_stripe_vars.element_font_styles))}return l()(e,[{key:"setupStripeElement",value:function(){var e={};return 0!==this.accountId.trim().length&&(e={stripeAccount:this.accountId}),Stripe(this.publishableKey,e)}},{key:"getElements",value:function(e){var t={locale:this.locale};return this.fontStyles.length>0&&(t={fonts:this.fontStyles,locale:this.locale}),e.elements(t)}},{key:"createElement",value:function(e,t){var r=[],i=this.getElementsToMountOn(),n={style:this.getElementStyles(),classes:this.getElementClasses()};return i.forEach((function(t,i){"card"===t[0]?n.hidePostalCode=!!give_stripe_vars.checkout_address:"cardNumber"===t[0]?n.placeholder=give_stripe_vars.card_number_placeholder_text:"cardCvc"===t[0]?n.placeholder=give_stripe_vars.card_cvc_placeholder_text:delete n.placeholder,r.push(e.create(t[0],n))})),"cardNumber"===i[0][0]&&r[0].addEventListener("change",(function(e){var r="diners"===e.brand?"dinersclub":e.brand;t.querySelector(".card-type").className="card-type "+r})),r}},{key:"destroyElement",value:function(e){e.forEach((function(e,t){e.destroy()}))}},{key:"getElementStyles",value:function(){return{base:give_stripe_vars.element_base_styles,complete:give_stripe_vars.element_complete_styles,empty:give_stripe_vars.element_empty_styles,invalid:give_stripe_vars.element_invalid_styles}}},{key:"getElementClasses",value:function(){return{focus:"focus",empty:"empty",invalid:"invalid"}}},{key:"getElementsToMountOn",value:function(){var e={cardNumber:"#give-card-number-field-".concat(this.idPrefix),cardCvc:"#give-card-cvc-field-".concat(this.idPrefix),cardExpiry:"#give-card-expiration-field-".concat(this.idPrefix)};return this.isSingleInputField&&(e={card:"#give-stripe-single-cc-fields-".concat(this.idPrefix)}),Object.entries(e)}},{key:"mountElement",value:function(e){var t=this.getElementsToMountOn();Array.from(e).forEach((function(e,r){e.mount(t[r][1])}))}},{key:"unMountElement",value:function(e){var t=this.getElementsToMountOn();Array.from(e).forEach((function(e,r){e.unmount(t[r][1])}))}},{key:"createPaymentMethod",value:function(e,t,r){var i={};if(this.isSingleInputField||(i.name=e.querySelector('input[name="card_name"]').value),!give_stripe_vars.stripe_card_update){var n=e.querySelector('input[name="give_first"]').value,a=e.querySelector('input[name="give_last"]').value,l=e.querySelector('input[name="give_email"]').value;i.name="".concat(n," ").concat(a),i.email=l,e.querySelector("[id^=give-purchase-button]").setAttribute("disabled","disabled")}if(give_stripe_vars.checkout_address&&!give_stripe_vars.stripe_card_update){var o=e.querySelector(".card-address").value,u=e.querySelector(".card-address-2").value,c=e.querySelector(".card-city").value,s=e.querySelector(".card_state").value,d=e.querySelector(".card-zip").value,v=e.querySelector(".billing-country").value;i.address={line1:o||"",line2:u||"",city:c||"",state:s||"",postal_code:d||"",country:v||""}}t.createPaymentMethod({type:"card",card:r[0],billing_details:i}).then((function(t){if(t.error){var r=jQuery(e),i='<div class="give_errors"><p class="give_error">'.concat(t.error.message,"</p></div>"),n=e.getAttribute("data-id");return Give.form.fn.resetDonationButton(r),void(e.querySelector("#give-stripe-payment-errors-".concat(n)).innerHTML=i)}e.querySelector('input[name="give_stripe_payment_method"]').value=t.paymentMethod.id,e.submit()}))}},{key:"triggerStripeModal",value:function(e,t,r,i){var n=e.querySelector('input[name="give-form-id-prefix"]'),a=e.querySelector("#give-stripe-checkout-modal-donate-button-".concat(n.value)),l=e.querySelector('input[name="card_name"]'),o={};i.forEach((function(e){o.cardName=!1,e.addEventListener("ready",(function(e){o[e.elementType]=!1,o.cardName="card"===e.elementType})),e.addEventListener("change",(function(e){o[e.elementType]=e.complete,Object.values(o).every((function(e){return!0===e}))?a.removeAttribute("disabled"):a.setAttribute("disabled","disabled")}))})),null!==l&&l.addEventListener("keyup",(function(e){o.cardName=""!==e.target.value,Object.values(o).every((function(e){return!0===e}))?a.removeAttribute("disabled"):a.setAttribute("disabled","disabled")})),null!==a&&a.addEventListener("click",(function(n){var l=n.target,o=l.nextElementSibling;a.getAttribute("data-is_legacy_form")?(l.value=give_global_vars.purchase_loading,o.style.display="inline-block"):(l.value="",o.classList.add("sequoia-loader"),o.classList.add("spinning"),o.classList.remove("give-loading-animation")),t.createPaymentMethod(e,r,i),n.preventDefault()}))}}]),e}();document.addEventListener("DOMContentLoaded",(function(e){Array.from(document.querySelectorAll(".give-form-wrap")).forEach((function(e){var t=e.querySelector(".give-form");if(null!==t&&t.getAttribute("data-publishable-key")){var r=give_stripe_vars.hasOwnProperty("stripe_card_update")&&parseInt(give_stripe_vars.stripe_card_update),i=t.querySelector('input[name="give-form-id-prefix"]'),n=new o(t),a=n.setupStripeElement(),l=n.getElements(a),u=n.createElement(l,t),c=Give.form.fn.getInfo("stripe-checkout-type",t);d(!1),document.addEventListener("give_gateway_loaded",d),t.onsubmit=function(e){var l=s(),o=l.selectedGatewayId,c=l.isStripeModalCheckoutGateway;if((r||"stripe"===o)&&(n.createPaymentMethod(t,a,u),e.preventDefault()),c){var d=t.querySelector(".give-stripe-checkout-modal"),v=d.querySelector(".give-stripe-checkout-donation-amount"),p=d.querySelector(".give-stripe-checkout-donor-email"),f=t.querySelector(".give-final-total-amount").textContent,m=t.querySelector('input[name="give_email"]').value,y=t.querySelector('input[name="give_validate_stripe_payment_fields"]');d.classList.add("give-stripe-checkout-show-modal"),null!==v&&(v.innerHTML=f),null!==p&&(p.innerHTML=m),y.setAttribute("value","1");var g=t.querySelector(".give-stripe-checkout-modal-close");null!==g&&g.addEventListener("click",(function(e){t.querySelector("#give-stripe-checkout-modal-".concat(i.value)).classList.remove("give-stripe-checkout-show-modal");var r=t.querySelector(".give-submit");null!==r&&(r.value=r.getAttribute("data-before-validation-label"),r.nextElementSibling.style.display="none",r.removeAttribute("disabled"),t.querySelector('input[name="give_validate_stripe_payment_fields"]').setAttribute("value","0")),e.preventDefault()})),e.preventDefault()}}}function s(){var e=t.querySelector('input[name="give-gateway"]'),r=e?e.value:"",i="modal"===c;return{formGateway:e,selectedGatewayId:r,isCheckoutTypeModal:i,isStripeModalCheckoutGateway:e&&"stripe_checkout"===r&&i}}function d(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],i=s(),l=i.selectedGatewayId,o=i.isStripeModalCheckoutGateway;r||"stripe"===l||o?n.mountElement(u):e&&n.unMountElement(u),o&&n.triggerStripeModal(t,n,a,u)}}))}))}});
|
give.php
CHANGED
@@ -5,7 +5,7 @@
|
|
5 |
* Description: The most robust, flexible, and intuitive way to accept donations on WordPress.
|
6 |
* Author: GiveWP
|
7 |
* Author URI: https://givewp.com/
|
8 |
-
* Version: 2.9.
|
9 |
* Text Domain: give
|
10 |
* Domain Path: /languages
|
11 |
*
|
@@ -250,7 +250,7 @@ final class Give {
|
|
250 |
private function setup_constants() {
|
251 |
// Plugin version.
|
252 |
if ( ! defined( 'GIVE_VERSION' ) ) {
|
253 |
-
define( 'GIVE_VERSION', '2.9.
|
254 |
}
|
255 |
|
256 |
// Plugin Root File.
|
5 |
* Description: The most robust, flexible, and intuitive way to accept donations on WordPress.
|
6 |
* Author: GiveWP
|
7 |
* Author URI: https://givewp.com/
|
8 |
+
* Version: 2.9.4
|
9 |
* Text Domain: give
|
10 |
* Domain Path: /languages
|
11 |
*
|
250 |
private function setup_constants() {
|
251 |
// Plugin version.
|
252 |
if ( ! defined( 'GIVE_VERSION' ) ) {
|
253 |
+
define( 'GIVE_VERSION', '2.9.4' );
|
254 |
}
|
255 |
|
256 |
// Plugin Root File.
|
readme.txt
CHANGED
@@ -5,7 +5,7 @@ Tags: donation, fundraising, crowdfunding, givewp, give
|
|
5 |
Requires at least: 4.9
|
6 |
Tested up to: 5.5
|
7 |
Requires PHP: 5.6
|
8 |
-
Stable tag: 2.9.
|
9 |
License: GPLv3
|
10 |
License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
11 |
|
@@ -51,7 +51,7 @@ Find out more:
|
|
51 |
|
52 |
= Who Uses GiveWP? =
|
53 |
|
54 |
-
With more than
|
55 |
|
56 |
= Why Use GiveWP for Donations? =
|
57 |
|
@@ -86,13 +86,13 @@ GiveWP comes with several payment gateway options:
|
|
86 |
|
87 |
GiveWP's goal is to "Democratize Generosity." We want to make it easy for *everyone* to raise funds online. The money you raise using GiveWP is yours to support your cause. Period. We are supported through the sale of [premium GiveWP add-ons](https://go.givewp.com/addons "View all of GiveWP's Premium Add-ons"). Add-ons enable advanced features that enable you to extend the functionality of GiveWP.
|
88 |
|
89 |
-
Must-Have Add-ons for GiveWP:
|
90 |
|
91 |
* Recurring Donations
|
92 |
-
* Form Field Manager
|
93 |
-
* Fee Recovery
|
94 |
-
* Tributes
|
95 |
-
* PDF Receipts
|
96 |
* Funds & Designations
|
97 |
|
98 |
[View all of GiveWP's Add-ons](https://go.givewp.com/addons "View all GiveWP add-ons") to discover all the ways you can further enhance and extend GiveWP.
|
@@ -213,24 +213,36 @@ The 2% fee on Stripe donations only applies to donations taken via our free Stri
|
|
213 |
|
214 |
== Screenshots ==
|
215 |
|
216 |
-
1.
|
217 |
|
218 |
-
2.
|
219 |
|
220 |
-
3.
|
221 |
|
222 |
-
4.
|
223 |
|
224 |
-
5.
|
225 |
|
226 |
-
6.
|
227 |
|
228 |
-
7.
|
229 |
|
230 |
-
8.
|
|
|
|
|
|
|
|
|
|
|
|
|
231 |
|
232 |
== Changelog ==
|
233 |
|
|
|
|
|
|
|
|
|
|
|
|
|
234 |
= 2.9.3: November 17th, 2020 =
|
235 |
* Fixed: Stripe Credit Card donations now work when it is not the default gateway
|
236 |
* Fixed: Stripe Checkout Modal are working again as well
|
@@ -313,19 +325,19 @@ The 2% fee on Stripe donations only applies to donations taken via our free Stri
|
|
313 |
|
314 |
= 2.7.1: June 30th, 2020 =
|
315 |
* Fix: Resolved an issue with the 2.7.0 releasing causing the Form Grid shortcode to not render due to a PHP fatal error. [#4877](https://github.com/impress-org/givewp/issues/4877)
|
316 |
-
* Fix: Updated a JavaScript version to the latest to prevent browser caching from causing the Reports widgets to not function until a hard browser refresh. [#4876](https://github.com/impress-org/givewp/pull/4876)
|
317 |
|
318 |
= 2.7.0: June 29th, 2020 =
|
319 |
* New: We're excited to announce a new way to create your donation forms called "Form Templates". The first template is allows you to create a highly customizable multi-step donation form where you control all the text, colors, and images in place. Be sure to update to the latest version of your add-ons for full compatibility. [Read more about Form Templates](https://go.givewp.com/wpgivewp27)
|
320 |
* New: Multiple Stripe Account is here! Now you can connect to multiple Stripe accounts and set them per donation form. That means organizations, like charities with chapters or schools with clubs that need to raise money online, can create different forms to accept donations through separate Stripe accounts. [Read more about Stripe Multi-Accounts](http://docs.givewp.com/stripe-free)
|
321 |
* New: Our Gutenberg blocks' UI was improved so they are have a better user experience.
|
322 |
-
* Tweak: Previous to this release we were packaging two TCPDF packages for backwards compatibility reason. We removed one of the packages and now are relying on the composer package. This means that you'll need to be running the PDF Receipts version add-on at 2.3.4 or higher for compatibility. [#4656](https://github.com/impress-org/givewp/pull/4656)
|
323 |
* Fix: If you install GiveWP and didn't configure anything there would be a JavaScript error on the frontend if Stripe is not connected but enabled, which it is by default for new installs. [#4709](https://github.com/impress-org/givewp/pull/4709)
|
324 |
* Fix: Improved how reports are rounding percentages so that the trend comparisons are more accurate. [#4766](https://github.com/impress-org/givewp/issues/4766)
|
325 |
-
* Fix: Monaco doesn't have states so don't display or require a state field when that country is selected. [#4773](https://github.com/impress-org/givewp/pull/4773)
|
326 |
* Fix: Properly internationalized a tooltip in Stripe so translations properly display. [#4677](https://github.com/impress-org/givewp/pull/4677)
|
327 |
* Fix: The "Add-ons" like on the plugin activation welcome screen was broken. [#4843](https://github.com/impress-org/givewp/pull/4843)
|
328 |
-
* Fix: Resolved a caching conflict with WP Rocket that was preventing donation forms from being cached properly. [#4546](https://github.com/impress-org/givewp/pull/4546)
|
329 |
* Fix: Prevented a fatal error that could occur on the Donor profile screen in WP-Admin when the Stripe add-on is active but no Stripe payment gateways are enabled. [#4787](https://github.com/impress-org/givewp/pull/4787)
|
330 |
|
331 |
= 2.6.3: May 19th, 2020 =
|
@@ -360,8 +372,8 @@ The 2% fee on Stripe donations only applies to donations taken via our free Stri
|
|
360 |
* New: The Akismet SPAM feature has been improved with logs for admins to better understand why an email has been flagged as SPAM as well as a new Whitelist setting for them to allow email addresses to bypass the check. [#4110](https://github.com/impress-org/givewp/issues/4110)
|
361 |
* Fix: Resolved an issue with the "Recalculate Income Amount and Donation Counts for a Form" not accurately recalculating when using Currency Switcher add-on. [#4447](https://github.com/impress-org/givewp/issues/4447)
|
362 |
* Fix: Resolved an issue with large databases with more than 13,000 donors receiving a fatal error when viewing the donor's list screen. [#4444](https://github.com/impress-org/givewp/issues/4444)
|
363 |
-
* Tweak: You can now activate any plugin within the GiveWP Licenses tab. This resolves an issue with "this plugin does not have a valid header" error admins were receiving. [#4443](https://github.com/impress-org/givewp/issues/4443)
|
364 |
-
* Tweak: Updated the `[give_login]` shortcode text output to "Username or Email Address" to match WP's login. Note: you have been able to always log in using email but now the text accurately reflects that. [#4434](https://github.com/impress-org/givewp/issues/4434)
|
365 |
|
366 |
= 2.5.13: January 15th, 2020 =
|
367 |
* Fix: Resolved an issue when using button mode of multiple donation buttons appearing incorrectly within shortcodes, blocks, and widgets. [#4379](https://github.com/impress-org/givewp/issues/4379)
|
@@ -858,7 +870,7 @@ The 2% fee on Stripe donations only applies to donations taken via our free Stri
|
|
858 |
This version contains a database upgrade that improves performance by migrating donation meta to a new revenue table. Please ensure you have a backup in place prior to updating and be sure to update GiveWP Core and then your GiveWP Add-ons to the latest versions for maximum compatibility.
|
859 |
|
860 |
= 2.7.0 =
|
861 |
-
This version contains a database upgrade for donation forms and Stripe. Please ensure you have a backup in place prior to updating and be sure to update GiveWP Core and then your GiveWP Add-ons to the latest versions for maximum compatibility.
|
862 |
|
863 |
= 2.1.3 =
|
864 |
This version contains a database cleanup routine to delete donation payment meta that is not attached to any payment. For instance, if you deleted a payment the metadata associated with it still remained prior to this version. With this upgrade the orphaned data will be removed.
|
5 |
Requires at least: 4.9
|
6 |
Tested up to: 5.5
|
7 |
Requires PHP: 5.6
|
8 |
+
Stable tag: 2.9.4
|
9 |
License: GPLv3
|
10 |
License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
11 |
|
51 |
|
52 |
= Who Uses GiveWP? =
|
53 |
|
54 |
+
With more than 90,000+ active installs of GiveWP, we hear more and more success stories from nonprofit organizations using GiveWP. Causes are using GiveWP to raise millions of dollars per year. Check out some of our [GiveWP Stories](https://go.givewp.com/stories) and [Case Studies](https://go.givewp.com/case-studies) for details about their success.
|
55 |
|
56 |
= Why Use GiveWP for Donations? =
|
57 |
|
86 |
|
87 |
GiveWP's goal is to "Democratize Generosity." We want to make it easy for *everyone* to raise funds online. The money you raise using GiveWP is yours to support your cause. Period. We are supported through the sale of [premium GiveWP add-ons](https://go.givewp.com/addons "View all of GiveWP's Premium Add-ons"). Add-ons enable advanced features that enable you to extend the functionality of GiveWP.
|
88 |
|
89 |
+
Must-Have Add-ons for GiveWP:
|
90 |
|
91 |
* Recurring Donations
|
92 |
+
* Form Field Manager
|
93 |
+
* Fee Recovery
|
94 |
+
* Tributes
|
95 |
+
* PDF Receipts
|
96 |
* Funds & Designations
|
97 |
|
98 |
[View all of GiveWP's Add-ons](https://go.givewp.com/addons "View all GiveWP add-ons") to discover all the ways you can further enhance and extend GiveWP.
|
213 |
|
214 |
== Screenshots ==
|
215 |
|
216 |
+
1. This is an example of a simple, yet powerful, donation form that allows the user to input a custom amount.
|
217 |
|
218 |
+
2. Creating powerful donation forms is easy with GiveWP. Simply install the plugin, create a new donation form, set the desired giving options, and publish!
|
219 |
|
220 |
+
3. Donation form fields can appear within a modal window (as shown here), be revealed with a nice sliding animation, or display entirely on the page (default).
|
221 |
|
222 |
+
4. GiveWP makes the donation process simple and easy for your donors. This helps maximize conversion rates and further empower your cause.
|
223 |
|
224 |
+
5. The multi-level donation amount functionality allows you to set different giving levels for your donors to choose from. In addition, you can allow donors to specify custom donation amounts and even set donation goals.
|
225 |
|
226 |
+
6. The admin view of a donation form with multi-level amounts configured. GiveWP's flexible options allow you to control whether the amounts output as radio buttons, a select field, or input buttons.
|
227 |
|
228 |
+
7. Don't need donation levels? No problem. You can set a default amount and allow your donor's to configure a custom donation amount to create a simple, yet powerful, donation form.
|
229 |
|
230 |
+
8. In-depth donation reports allow you to track just how much your cause has raised over time. You can even export the data to CSV or PDF formats.
|
231 |
+
|
232 |
+
9. Extend GiveWP with a robust suite of powerful [Add-ons](https://go.givewp.com/addons "View all GiveWP Add-ons"). Accept recurring donations, credit cards, add custom form fields, and more!
|
233 |
+
|
234 |
+
10. GiveWP is thoroughly [documented](https://go.givewp.com/docs "Visit the GiveWP documentation") to help you get started quickly and learn basic to advanced features and functionalities.
|
235 |
+
|
236 |
+
11. GiveWP has a dedicated support team to help answer any questions you may have and help you through stumbling blocks.
|
237 |
|
238 |
== Changelog ==
|
239 |
|
240 |
+
= 2.9.4: November 20th, 2020 =
|
241 |
+
* Fixed: Revenue database migration for donations with an amount of 0 now work
|
242 |
+
* Fixed: Restored compatibility with versions of WP prior to 5.5 when deleting donations
|
243 |
+
* Fixed: Stripe single-input credit card fields work once again
|
244 |
+
* Fixed: Donor's updating the card of Stripe subscriptions work again
|
245 |
+
|
246 |
= 2.9.3: November 17th, 2020 =
|
247 |
* Fixed: Stripe Credit Card donations now work when it is not the default gateway
|
248 |
* Fixed: Stripe Checkout Modal are working again as well
|
325 |
|
326 |
= 2.7.1: June 30th, 2020 =
|
327 |
* Fix: Resolved an issue with the 2.7.0 releasing causing the Form Grid shortcode to not render due to a PHP fatal error. [#4877](https://github.com/impress-org/givewp/issues/4877)
|
328 |
+
* Fix: Updated a JavaScript version to the latest to prevent browser caching from causing the Reports widgets to not function until a hard browser refresh. [#4876](https://github.com/impress-org/givewp/pull/4876)
|
329 |
|
330 |
= 2.7.0: June 29th, 2020 =
|
331 |
* New: We're excited to announce a new way to create your donation forms called "Form Templates". The first template is allows you to create a highly customizable multi-step donation form where you control all the text, colors, and images in place. Be sure to update to the latest version of your add-ons for full compatibility. [Read more about Form Templates](https://go.givewp.com/wpgivewp27)
|
332 |
* New: Multiple Stripe Account is here! Now you can connect to multiple Stripe accounts and set them per donation form. That means organizations, like charities with chapters or schools with clubs that need to raise money online, can create different forms to accept donations through separate Stripe accounts. [Read more about Stripe Multi-Accounts](http://docs.givewp.com/stripe-free)
|
333 |
* New: Our Gutenberg blocks' UI was improved so they are have a better user experience.
|
334 |
+
* Tweak: Previous to this release we were packaging two TCPDF packages for backwards compatibility reason. We removed one of the packages and now are relying on the composer package. This means that you'll need to be running the PDF Receipts version add-on at 2.3.4 or higher for compatibility. [#4656](https://github.com/impress-org/givewp/pull/4656)
|
335 |
* Fix: If you install GiveWP and didn't configure anything there would be a JavaScript error on the frontend if Stripe is not connected but enabled, which it is by default for new installs. [#4709](https://github.com/impress-org/givewp/pull/4709)
|
336 |
* Fix: Improved how reports are rounding percentages so that the trend comparisons are more accurate. [#4766](https://github.com/impress-org/givewp/issues/4766)
|
337 |
+
* Fix: Monaco doesn't have states so don't display or require a state field when that country is selected. [#4773](https://github.com/impress-org/givewp/pull/4773)
|
338 |
* Fix: Properly internationalized a tooltip in Stripe so translations properly display. [#4677](https://github.com/impress-org/givewp/pull/4677)
|
339 |
* Fix: The "Add-ons" like on the plugin activation welcome screen was broken. [#4843](https://github.com/impress-org/givewp/pull/4843)
|
340 |
+
* Fix: Resolved a caching conflict with WP Rocket that was preventing donation forms from being cached properly. [#4546](https://github.com/impress-org/givewp/pull/4546)
|
341 |
* Fix: Prevented a fatal error that could occur on the Donor profile screen in WP-Admin when the Stripe add-on is active but no Stripe payment gateways are enabled. [#4787](https://github.com/impress-org/givewp/pull/4787)
|
342 |
|
343 |
= 2.6.3: May 19th, 2020 =
|
372 |
* New: The Akismet SPAM feature has been improved with logs for admins to better understand why an email has been flagged as SPAM as well as a new Whitelist setting for them to allow email addresses to bypass the check. [#4110](https://github.com/impress-org/givewp/issues/4110)
|
373 |
* Fix: Resolved an issue with the "Recalculate Income Amount and Donation Counts for a Form" not accurately recalculating when using Currency Switcher add-on. [#4447](https://github.com/impress-org/givewp/issues/4447)
|
374 |
* Fix: Resolved an issue with large databases with more than 13,000 donors receiving a fatal error when viewing the donor's list screen. [#4444](https://github.com/impress-org/givewp/issues/4444)
|
375 |
+
* Tweak: You can now activate any plugin within the GiveWP Licenses tab. This resolves an issue with "this plugin does not have a valid header" error admins were receiving. [#4443](https://github.com/impress-org/givewp/issues/4443)
|
376 |
+
* Tweak: Updated the `[give_login]` shortcode text output to "Username or Email Address" to match WP's login. Note: you have been able to always log in using email but now the text accurately reflects that. [#4434](https://github.com/impress-org/givewp/issues/4434)
|
377 |
|
378 |
= 2.5.13: January 15th, 2020 =
|
379 |
* Fix: Resolved an issue when using button mode of multiple donation buttons appearing incorrectly within shortcodes, blocks, and widgets. [#4379](https://github.com/impress-org/givewp/issues/4379)
|
870 |
This version contains a database upgrade that improves performance by migrating donation meta to a new revenue table. Please ensure you have a backup in place prior to updating and be sure to update GiveWP Core and then your GiveWP Add-ons to the latest versions for maximum compatibility.
|
871 |
|
872 |
= 2.7.0 =
|
873 |
+
This version contains a database upgrade for donation forms and Stripe. Please ensure you have a backup in place prior to updating and be sure to update GiveWP Core and then your GiveWP Add-ons to the latest versions for maximum compatibility.
|
874 |
|
875 |
= 2.1.3 =
|
876 |
This version contains a database cleanup routine to delete donation payment meta that is not attached to any payment. For instance, if you deleted a payment the metadata associated with it still remained prior to this version. With this upgrade the orphaned data will be removed.
|
src/Revenue/Listeners/DeleteRevenueWhenDonationDeleted.php
CHANGED
@@ -1,10 +1,8 @@
|
|
1 |
<?php
|
2 |
-
|
3 |
namespace Give\Revenue\Listeners;
|
4 |
|
5 |
-
use Give\Framework\Database\
|
6 |
use Give\Revenue\Repositories\Revenue;
|
7 |
-
use WP_Post;
|
8 |
|
9 |
class DeleteRevenueWhenDonationDeleted {
|
10 |
/**
|
@@ -16,6 +14,8 @@ class DeleteRevenueWhenDonationDeleted {
|
|
16 |
* DeleteRevenueWhenDonationDeleted constructor.
|
17 |
*
|
18 |
* @since 2.9.2
|
|
|
|
|
19 |
*/
|
20 |
public function __construct( Revenue $revenueRepository ) {
|
21 |
$this->revenueRepository = $revenueRepository;
|
@@ -25,12 +25,14 @@ class DeleteRevenueWhenDonationDeleted {
|
|
25 |
* Deletes the revenue associated with a donation when a donation is deleted
|
26 |
*
|
27 |
* @since 2.9.2
|
|
|
|
|
|
|
28 |
*
|
29 |
-
* @
|
30 |
-
* @param WP_Post $post
|
31 |
*/
|
32 |
-
public function __invoke( $postId
|
33 |
-
if (
|
34 |
return;
|
35 |
}
|
36 |
|
1 |
<?php
|
|
|
2 |
namespace Give\Revenue\Listeners;
|
3 |
|
4 |
+
use Give\Framework\Database\Exceptions\DatabaseQueryException;
|
5 |
use Give\Revenue\Repositories\Revenue;
|
|
|
6 |
|
7 |
class DeleteRevenueWhenDonationDeleted {
|
8 |
/**
|
14 |
* DeleteRevenueWhenDonationDeleted constructor.
|
15 |
*
|
16 |
* @since 2.9.2
|
17 |
+
*
|
18 |
+
* @param Revenue $revenueRepository
|
19 |
*/
|
20 |
public function __construct( Revenue $revenueRepository ) {
|
21 |
$this->revenueRepository = $revenueRepository;
|
25 |
* Deletes the revenue associated with a donation when a donation is deleted
|
26 |
*
|
27 |
* @since 2.9.2
|
28 |
+
* @since 2.9.4 removed $post parameter for < WP 5.5 compatibility
|
29 |
+
*
|
30 |
+
* @param int $postId
|
31 |
*
|
32 |
+
* @throws DatabaseQueryException
|
|
|
33 |
*/
|
34 |
+
public function __invoke( $postId ) {
|
35 |
+
if ( 'give_payment' !== get_post_type( $postId ) ) {
|
36 |
return;
|
37 |
}
|
38 |
|
src/Revenue/Migrations/AddPastDonationsToRevenueTable.php
CHANGED
@@ -79,7 +79,7 @@ class AddPastDonationsToRevenueTable extends Migration {
|
|
79 |
];
|
80 |
|
81 |
$revenueRepository->insert( $revenueData );
|
82 |
-
$this->pauseUpdateOnError( $give_updates );
|
83 |
}
|
84 |
|
85 |
wp_reset_postdata();
|
@@ -107,11 +107,14 @@ class AddPastDonationsToRevenueTable extends Migration {
|
|
107 |
/**
|
108 |
* Pause update process and add log.
|
109 |
*
|
110 |
-
* @param Give_Updates $give_updates
|
111 |
-
*
|
112 |
* @since 2.9.2
|
|
|
|
|
|
|
|
|
|
|
113 |
*/
|
114 |
-
private function pauseUpdateOnError( $give_updates ) {
|
115 |
global $wpdb;
|
116 |
|
117 |
if ( ! $wpdb->last_error ) {
|
@@ -121,8 +124,9 @@ class AddPastDonationsToRevenueTable extends Migration {
|
|
121 |
give()->logs->add(
|
122 |
'Update Error',
|
123 |
sprintf(
|
124 |
-
'An error occurred inserting data into the revenue table: ' . "\n" . '%1$s',
|
125 |
-
$wpdb->last_error
|
|
|
126 |
),
|
127 |
0,
|
128 |
'update'
|
79 |
];
|
80 |
|
81 |
$revenueRepository->insert( $revenueData );
|
82 |
+
$this->pauseUpdateOnError( $give_updates, $revenueData );
|
83 |
}
|
84 |
|
85 |
wp_reset_postdata();
|
107 |
/**
|
108 |
* Pause update process and add log.
|
109 |
*
|
|
|
|
|
110 |
* @since 2.9.2
|
111 |
+
* @since 2.9.4 Add second argument to function and mention donation data in exception message.
|
112 |
+
*
|
113 |
+
* @param Give_Updates $give_updates
|
114 |
+
*
|
115 |
+
* @param array $revenueData Donation data to insert into revenue table
|
116 |
*/
|
117 |
+
private function pauseUpdateOnError( $give_updates, $revenueData ) {
|
118 |
global $wpdb;
|
119 |
|
120 |
if ( ! $wpdb->last_error ) {
|
124 |
give()->logs->add(
|
125 |
'Update Error',
|
126 |
sprintf(
|
127 |
+
'An error occurred inserting data into the revenue table: ' . "\n" . '%1$s' . "\n" . '%2$s',
|
128 |
+
$wpdb->last_error,
|
129 |
+
print_r( $revenueData, true )
|
130 |
),
|
131 |
0,
|
132 |
'update'
|
src/Revenue/Repositories/Revenue.php
CHANGED
@@ -50,6 +50,7 @@ class Revenue {
|
|
50 |
* @param $revenueId
|
51 |
*
|
52 |
* @return false|int
|
|
|
53 |
*/
|
54 |
public function deleteByDonationId( $revenueId ) {
|
55 |
global $wpdb;
|
@@ -76,28 +77,39 @@ class Revenue {
|
|
76 |
* Validate new revenue data.
|
77 |
*
|
78 |
* @since 2.9.0
|
|
|
79 |
*
|
80 |
* @param array $array
|
81 |
*/
|
82 |
protected function validateNewRevenueData( $array ) {
|
83 |
$required = [ 'donation_id', 'form_id', 'amount' ];
|
84 |
|
85 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
86 |
|
87 |
if ( array_diff( $required, array_keys( $array ) ) ) {
|
|
|
|
|
|
|
|
|
|
|
88 |
throw new InvalidArgumentException(
|
89 |
sprintf(
|
90 |
-
'
|
91 |
-
implode( ', ', $required )
|
|
|
92 |
)
|
93 |
);
|
94 |
}
|
95 |
-
|
96 |
-
foreach ( $required as $columnName ) {
|
97 |
-
if ( empty( $array[ $columnName ] ) ) {
|
98 |
-
throw new InvalidArgumentException( 'Empty value is not allowed to create revenue.' );
|
99 |
-
}
|
100 |
-
}
|
101 |
}
|
102 |
|
103 |
/**
|
50 |
* @param $revenueId
|
51 |
*
|
52 |
* @return false|int
|
53 |
+
* @throws DatabaseQueryException
|
54 |
*/
|
55 |
public function deleteByDonationId( $revenueId ) {
|
56 |
global $wpdb;
|
77 |
* Validate new revenue data.
|
78 |
*
|
79 |
* @since 2.9.0
|
80 |
+
* @since 2.9.4 Mention donation id in exception message.
|
81 |
*
|
82 |
* @param array $array
|
83 |
*/
|
84 |
protected function validateNewRevenueData( $array ) {
|
85 |
$required = [ 'donation_id', 'form_id', 'amount' ];
|
86 |
|
87 |
+
if ( empty( $array['donation_id'] ) ) {
|
88 |
+
unset( $array['donation_id'] );
|
89 |
+
}
|
90 |
+
|
91 |
+
if ( empty( $array['form_id'] ) ) {
|
92 |
+
unset( $array['form_id'] );
|
93 |
+
}
|
94 |
+
|
95 |
+
if ( ! is_numeric( $array['amount'] ) || (int) $array['amount'] < 0 ) {
|
96 |
+
unset( $array['amount'] );
|
97 |
+
}
|
98 |
|
99 |
if ( array_diff( $required, array_keys( $array ) ) ) {
|
100 |
+
$errorMessage = '';
|
101 |
+
if ( isset( $array['donation_id'] ) ) {
|
102 |
+
$errorMessage = "An error occurred when processing Donation #{$array['donation_id']}. ";
|
103 |
+
}
|
104 |
+
|
105 |
throw new InvalidArgumentException(
|
106 |
sprintf(
|
107 |
+
'%2$sTo insert revenue, please provide valid %1$s.',
|
108 |
+
implode( ', ', $required ),
|
109 |
+
$errorMessage
|
110 |
)
|
111 |
);
|
112 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
113 |
}
|
114 |
|
115 |
/**
|
src/Revenue/RevenueServiceProvider.php
CHANGED
@@ -29,7 +29,7 @@ class RevenueServiceProvider implements ServiceProvider {
|
|
29 |
public function boot() {
|
30 |
$this->registerMigrations();
|
31 |
|
32 |
-
Hooks::addAction( 'delete_post', DeleteRevenueWhenDonationDeleted::class, '__invoke', 10,
|
33 |
Hooks::addAction( 'give_insert_payment', DonationHandler::class, 'handle', 999, 1 );
|
34 |
Hooks::addAction( 'give_register_updates', AddPastDonationsToRevenueTable::class, 'register', 10, 1 );
|
35 |
}
|
29 |
public function boot() {
|
30 |
$this->registerMigrations();
|
31 |
|
32 |
+
Hooks::addAction( 'delete_post', DeleteRevenueWhenDonationDeleted::class, '__invoke', 10, 1 );
|
33 |
Hooks::addAction( 'give_insert_payment', DonationHandler::class, 'handle', 999, 1 );
|
34 |
Hooks::addAction( 'give_register_updates', AddPastDonationsToRevenueTable::class, 'register', 10, 1 );
|
35 |
}
|
vendor/autoload.php
CHANGED
@@ -4,4 +4,4 @@
|
|
4 |
|
5 |
require_once __DIR__ . '/composer/autoload_real.php';
|
6 |
|
7 |
-
return
|
4 |
|
5 |
require_once __DIR__ . '/composer/autoload_real.php';
|
6 |
|
7 |
+
return ComposerAutoloaderInit115036708517661f31f3a0cd5564fa01::getLoader();
|
vendor/composer/InstalledVersions.php
CHANGED
@@ -14,12 +14,12 @@ class InstalledVersions
|
|
14 |
private static $installed = array (
|
15 |
'root' =>
|
16 |
array (
|
17 |
-
'pretty_version' => '2.9.
|
18 |
-
'version' => '2.9.
|
19 |
'aliases' =>
|
20 |
array (
|
21 |
),
|
22 |
-
'reference' => '
|
23 |
'name' => 'impress-org/give',
|
24 |
),
|
25 |
'versions' =>
|
@@ -35,12 +35,12 @@ private static $installed = array (
|
|
35 |
),
|
36 |
'impress-org/give' =>
|
37 |
array (
|
38 |
-
'pretty_version' => '2.9.
|
39 |
-
'version' => '2.9.
|
40 |
'aliases' =>
|
41 |
array (
|
42 |
),
|
43 |
-
'reference' => '
|
44 |
),
|
45 |
'paypal/paypal-checkout-sdk' =>
|
46 |
array (
|
14 |
private static $installed = array (
|
15 |
'root' =>
|
16 |
array (
|
17 |
+
'pretty_version' => '2.9.4',
|
18 |
+
'version' => '2.9.4.0',
|
19 |
'aliases' =>
|
20 |
array (
|
21 |
),
|
22 |
+
'reference' => '85d0a6ff1f9aaab1c5233f11c78e687339639090',
|
23 |
'name' => 'impress-org/give',
|
24 |
),
|
25 |
'versions' =>
|
35 |
),
|
36 |
'impress-org/give' =>
|
37 |
array (
|
38 |
+
'pretty_version' => '2.9.4',
|
39 |
+
'version' => '2.9.4.0',
|
40 |
'aliases' =>
|
41 |
array (
|
42 |
),
|
43 |
+
'reference' => '85d0a6ff1f9aaab1c5233f11c78e687339639090',
|
44 |
),
|
45 |
'paypal/paypal-checkout-sdk' =>
|
46 |
array (
|
vendor/composer/autoload_real.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
|
3 |
// autoload_real.php @generated by Composer
|
4 |
|
5 |
-
class
|
6 |
{
|
7 |
private static $loader;
|
8 |
|
@@ -24,15 +24,15 @@ class ComposerAutoloaderInitf7b9e71440a86dd9e05c154d9bd1bd24
|
|
24 |
|
25 |
require __DIR__ . '/platform_check.php';
|
26 |
|
27 |
-
spl_autoload_register(array('
|
28 |
self::$loader = $loader = new \Composer\Autoload\ClassLoader();
|
29 |
-
spl_autoload_unregister(array('
|
30 |
|
31 |
$useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
|
32 |
if ($useStaticLoader) {
|
33 |
require __DIR__ . '/autoload_static.php';
|
34 |
|
35 |
-
call_user_func(\Composer\Autoload\
|
36 |
} else {
|
37 |
$map = require __DIR__ . '/autoload_namespaces.php';
|
38 |
foreach ($map as $namespace => $path) {
|
2 |
|
3 |
// autoload_real.php @generated by Composer
|
4 |
|
5 |
+
class ComposerAutoloaderInit115036708517661f31f3a0cd5564fa01
|
6 |
{
|
7 |
private static $loader;
|
8 |
|
24 |
|
25 |
require __DIR__ . '/platform_check.php';
|
26 |
|
27 |
+
spl_autoload_register(array('ComposerAutoloaderInit115036708517661f31f3a0cd5564fa01', 'loadClassLoader'), true, true);
|
28 |
self::$loader = $loader = new \Composer\Autoload\ClassLoader();
|
29 |
+
spl_autoload_unregister(array('ComposerAutoloaderInit115036708517661f31f3a0cd5564fa01', 'loadClassLoader'));
|
30 |
|
31 |
$useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
|
32 |
if ($useStaticLoader) {
|
33 |
require __DIR__ . '/autoload_static.php';
|
34 |
|
35 |
+
call_user_func(\Composer\Autoload\ComposerStaticInit115036708517661f31f3a0cd5564fa01::getInitializer($loader));
|
36 |
} else {
|
37 |
$map = require __DIR__ . '/autoload_namespaces.php';
|
38 |
foreach ($map as $namespace => $path) {
|
vendor/composer/autoload_static.php
CHANGED
@@ -4,7 +4,7 @@
|
|
4 |
|
5 |
namespace Composer\Autoload;
|
6 |
|
7 |
-
class
|
8 |
{
|
9 |
public static $prefixLengthsPsr4 = array (
|
10 |
'S' =>
|
@@ -75,9 +75,9 @@ class ComposerStaticInitf7b9e71440a86dd9e05c154d9bd1bd24
|
|
75 |
public static function getInitializer(ClassLoader $loader)
|
76 |
{
|
77 |
return \Closure::bind(function () use ($loader) {
|
78 |
-
$loader->prefixLengthsPsr4 =
|
79 |
-
$loader->prefixDirsPsr4 =
|
80 |
-
$loader->classMap =
|
81 |
|
82 |
}, null, ClassLoader::class);
|
83 |
}
|
4 |
|
5 |
namespace Composer\Autoload;
|
6 |
|
7 |
+
class ComposerStaticInit115036708517661f31f3a0cd5564fa01
|
8 |
{
|
9 |
public static $prefixLengthsPsr4 = array (
|
10 |
'S' =>
|
75 |
public static function getInitializer(ClassLoader $loader)
|
76 |
{
|
77 |
return \Closure::bind(function () use ($loader) {
|
78 |
+
$loader->prefixLengthsPsr4 = ComposerStaticInit115036708517661f31f3a0cd5564fa01::$prefixLengthsPsr4;
|
79 |
+
$loader->prefixDirsPsr4 = ComposerStaticInit115036708517661f31f3a0cd5564fa01::$prefixDirsPsr4;
|
80 |
+
$loader->classMap = ComposerStaticInit115036708517661f31f3a0cd5564fa01::$classMap;
|
81 |
|
82 |
}, null, ClassLoader::class);
|
83 |
}
|
vendor/composer/installed.php
CHANGED
@@ -1,12 +1,12 @@
|
|
1 |
<?php return array (
|
2 |
'root' =>
|
3 |
array (
|
4 |
-
'pretty_version' => '2.9.
|
5 |
-
'version' => '2.9.
|
6 |
'aliases' =>
|
7 |
array (
|
8 |
),
|
9 |
-
'reference' => '
|
10 |
'name' => 'impress-org/give',
|
11 |
),
|
12 |
'versions' =>
|
@@ -22,12 +22,12 @@
|
|
22 |
),
|
23 |
'impress-org/give' =>
|
24 |
array (
|
25 |
-
'pretty_version' => '2.9.
|
26 |
-
'version' => '2.9.
|
27 |
'aliases' =>
|
28 |
array (
|
29 |
),
|
30 |
-
'reference' => '
|
31 |
),
|
32 |
'paypal/paypal-checkout-sdk' =>
|
33 |
array (
|
1 |
<?php return array (
|
2 |
'root' =>
|
3 |
array (
|
4 |
+
'pretty_version' => '2.9.4',
|
5 |
+
'version' => '2.9.4.0',
|
6 |
'aliases' =>
|
7 |
array (
|
8 |
),
|
9 |
+
'reference' => '85d0a6ff1f9aaab1c5233f11c78e687339639090',
|
10 |
'name' => 'impress-org/give',
|
11 |
),
|
12 |
'versions' =>
|
22 |
),
|
23 |
'impress-org/give' =>
|
24 |
array (
|
25 |
+
'pretty_version' => '2.9.4',
|
26 |
+
'version' => '2.9.4.0',
|
27 |
'aliases' =>
|
28 |
array (
|
29 |
),
|
30 |
+
'reference' => '85d0a6ff1f9aaab1c5233f11c78e687339639090',
|
31 |
),
|
32 |
'paypal/paypal-checkout-sdk' =>
|
33 |
array (
|