Skip to content

Commit

Permalink
Checking 3.0 class instead of version
Browse files Browse the repository at this point in the history
  • Loading branch information
dparker1005 committed Jan 25, 2024
1 parent 57a6a31 commit da55a78
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion modules/ecommerce/pmpro/class-swsales-module-pmpro.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public static function init() {
add_filter( 'swsales_show_banner', array( __CLASS__, 'show_banner' ), 10, 2 );

// PMPro automatic discount application and default levels.
if ( version_compare( PMPRO_VERSION, '3.0', '>=' ) ) {
if ( class_exists( 'PMPro_Subscription' ) ) {
// PMPro 3.0+. Use filters for default level and discount code.
add_filter( 'wp', array( __CLASS__, 'enable_shortcodes_for_legacy_sitewide_sale_setups' ), 2 ); // Priority 2 so that it is the same as core PMPro.
add_filter( 'pmpro_default_level', array( __CLASS__, 'filter_default_level' ) );
Expand Down

0 comments on commit da55a78

Please sign in to comment.