AffiliateWP 2.7 is now available

The AffiliateWP 2.7 development release is now available and packed full of improvements.

New minimum required versions for PHP and WordPress

As of 2.7, AffiliateWP now requires PHP 5.6 and WordPress 5.0.

The multi-year effort that’s lead to these changes has been detailed in several posts already this year:

  • In March 2021, we announced our new minimum requirements roadmap
  • In May 2021, posted about upcoming changes to required minimums in AffiliateWP core and add-ons.

Minimum requirements not met

Customers lacking the necessary requirements will be prevented from getting update notifications for 2.7 until those requirements have been met.

If a manual upgrade is performed and the minimum requirements aren’t met, AffiliateWP will revert to partial activation mode and display something like the following in the Plugins screen:

Partial activation mode example.

Future version bumps

If you’re looking to the future, the next set of minimum version bumps is scheduled for Sept. 2021. We encourage you to check out our Minimum Requirements Roadmap for more information.

Changes to the bootstrap and loading order

Other notable improvements in this release were some necessary changes we made to how AffiliateWP loads itself. We also introduced a new affwp_plugins_loaded hook for add-ons to use during their own bootstrap processes.

We detailed the new loading behavior in a recent post:

If you have written an add-on to extend AffiliateWP, your best option to maintain compatibility with core would be to toggle the action you use to bootstrap on. See below:

$affwp_version = get_option( 'affwp_version' );

if ( version_compare( $affwp_version, '2.7', '<' ) ) {
    add_action( 'plugins_loaded', 'your_bootstrap', 100 );
} else {
    add_action( 'affwp_plugins_loaded', 'your_bootstrap', 100 );

New affwp_get_{component}_by() functions

In a move to further standardize best practices in extending AffiliateWP, we’ve introduced a bunch of new functions in the global namespace for retrieving core objects. We wrote all about these new functions here:

Discontinued Integrations

Five integrations have been soft-discontinued in AffiliateWP 2.7, with official support ending in September 2021:

  1. ExchangeWP (iThemes Exchange)
  2. Jigoshop
  3. MarketPress
  4. Shopp
  5. WP eCommerce

We’ve published a doc that explains more about next steps for customers still using those integrations.

Other notable changes in 2.7

  • Campaigns have been converted to use a database table for storage rather than a MySQL view
  • A new AffWP\Campaign object has been introduced along with various campaign functions
  • PHP 8 compatibility fixes
  • Overhauled file header and function DocBlocks in hundreds of core files
  • All registered settings have been given a unique id attribute, making CSS/JS targeting much simpler
  • Fixed a bug in the WooCommerce integration that sometimes allowed product rates to override affiliate rates
  • Fixed a bug in the REST API v1 endpoints that would trigger a fatal if attempting to filter results by certain fields
  • Fixed a bug preventing the affiliate rate and rate types from being reset

Leave a Reply

Your email address will not be published. Required fields are marked *