What’s Coming Up in Give Core Version 1.8.9

Right now we’re in the middle of working through Give version 1.8.9 and it’s shaping up to be a pretty significant point release. Within this release there’s going to be a number important updates to the core codebase that we’d like to bring to your attention.

Deprecated Classes and Functions for Better Donation Terminology

If you’ve ever spent time working with our codebase you may have noticed words like “customer”, “store”, and “sale”. This is because when we first developed the plugin a lot of our code was previously being used for eCommerce transaction. Now, of course, it’s used to accept online donations. Hence, the code should reflect the appropriate terminology for its job.

To meet the goal of having a donation and nonprofit friendly verbiage we are deprecating many core classes, hooks, and functions. What’s this mean? Well, if you have WP_DEBUG turned on and an add-on or code you have implemented uses a deprecated hook or function you will see a notice telling you the function has been disabled and

Using a deprecated class will not trigger an error for backwards compatibility reasons and to prevent output errors like the header’s already sent.

Deprecated Classes

The following classes are being deprecated. The old classes will still work, and we’ve written unit tests to ensure that, but please don’t use them anymore within your code.

  • Give_Customer => Give_Donor
  • Give_DB_Customer => Give_DB_Donor
  • Give_DB_Customer_Meta => Give_Donor_Customer_Meta

Deprecated Hooks and Functions

There are a number of functions that are going away in 1.8.9. We initially tested our method for deprecating functions in the 1.8.8 and were happy with the smooth rollout. So, in 1.8.9 we’re deprecating a larger number of functions and hooks.

Functions

  • give_get_payment_customer_id => give_get_payment_donor_id
  • give_get_total_sales => give_get_total_donations
  • give_count_purchases_of_customer => give_count_donations_of_donor
  • give_get_purchase_stats_by_user => give_get_donation_stats_by_user
  • give_get_users_purchases => give_get_users_donations
  • give_has_purchases => give_has_donations
  • give_count_total_customers => give_count_total_donors
  • give_purchase_total_of_user => give_donation_total_of_user
  • give_delete_purchase => give_delete_donation
  • give_undo_purchase => give_undo_donation
  • give_trigger_purchase_delete => give_trigger_donation_delete
  • give_increase_purchase_count => give_increase_donation_count
  • give_record_sale_in_log => give_record_donation_in_log

Hooks

More Insight: To keep up-to-date on the deprecated classes and functions you can refer to this issue on GitHub. We took the first baby step to completing this issue in version 1.8.8 and now version 1.8.9 is a much larger step. The goal is that by version 2.0 all the terminology will be updated, including within the database.

Core Notice Urging Customers to Upgrade from PHP 5.2

Like our friends over at Yoast, we’ve decided it’s time to give our users a friendly nudge away from PHP 5.2 by asking them to update to at least version 5.6. In fact, Give runs great on PHP7 and ideally, that’s the version you want to be on. However, we understand there can be some conflicts still with some WordPress plugins.

In 1.8.9+, if Give is installed on a server running PHP 5.2:

  1. A dismissible notice will appear in wp-admin urging users to update
  2. Give core will still continue to work in PHP 5.2 but most add-ons will not
  3. If dismissed and the Give core remains active, the notice will reappear after 24-hours

Depending on how this goes, we may urge users using less than PHP 5.6 to update in the future. Note that Give core 1.8.9+ will work fine on PHP 5.2, we’ve fixed one bug preventing it from running that was introduce in version 1.8.

Additional Improvements and Bug Fixes

  • Strong passwords are now required to register a user with Give #1305
  • Added compatibility with XML Sitemap generator plugins (like Yoast SEO) when disabling single give forms views #1690
  • Better sorting of donation forms by amount #1253
  • Improvements to the “File” and “Media” field types #1758

That’s it for now! Check back or subscribe for more updates.

Want more? View the Complete 1.8.9 Milestone

 

Devin Walker

Head of Product and Founder of GiveWP, WordPress enthusiast, WordCamp speaker, mediocre golfer, post-rock obsessed cat lover and aspiring world traveler.

 

Leave a Comment