AffiliateWP 2.7 Beta 1 is now available for testing

We’re excited to share that AffiliateWP 2.7 Beta 1 is now available for testing.

From the early planning stages, 2.7 has always been planned as a development release in the sense that there are very few user-facing feature improvements. Notable changes in AffiliateWP 2.7 Beta 1 include:

  • A new way of bootstrapping core and add-ons
  • Requiring WordPress 5.0+ (see our Minimum Requirements Roadmap for more information)
  • Requiring PHP 5.6+
  • New affwp_plugins_loaded
  • New affwp_get_{component}_by() functions for most core objects
  • PHP 8 compatibility
  • Campaigns have been converted to a standard database table rather than a MySQL view
  • A new AffWP\Campaign object has been introduced

Please beta test add-on compatibility

The changes to the loading order in this beta version have the most potential to wreak havoc on third-party add-ons that may not be bootstrapping on the plugins_loaded hook or later.

We encourage all third-party developers to test their add-ons with this new release. If you find that you’re unable to accurately check for the existence of AffiliateWP, we recommend hooking your bootstrapping functionality to the new affwp_plugins_loaded hook on priority 100 or later.

For back-compat reasons, the best option is to toggle the action you bootstrap against based on the AffiliateWP version:

$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 );
}

Minimum requirements

The AffiliateWP 2.7 release will be the first in a long line of updates to begin enforcing minimum WordPress and PHP requirements. If either of the minimum requirements aren’t met, AffiliateWP will revert to a partial activation mode that prevents the bootstrap from running.

Therefore, partial activation was put in place to prevent site breakage in the traditional sense. In the less traditional sense, AffiliateWP will cease to operate and therefore “break” expected behavior. Rolling back to a previous update by uploading a zip file for any older release should get the site back to working order.

Finally, here is the roadmap for minimum required version changes coming up for AffiliateWP core:

Software / Minimum VersionEffective Date
WordPress 4.4Current
WordPress 5.0June 2021
WordPress 5.2Sept 2021
PHP 5.3Current
PHP 5.6June 2021
PHP 7.0Sept 2021

Leave a Reply

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