PluginProbe
WPFunnels – Funnel Builder for WooCommerce with Checkout & One Click Upsell / 3.13.3
WPFunnels – Funnel Builder for WooCommerce with Checkout & One Click Upsell v3.13.3
3.13.3 3.13.2 3.13.1 3.13.0 3.12.13 3.12.12 3.12.11 3.12.10 3.12.9 3.12.8 3.12.7 3.12.6 3.12.5 3.12.4 3.12.3 3.12.1 3.12.2 3.12.0 3.11.1 3.11.0 3.10.9 3.10.8 3.10.7 3.10.6 2.8.16 All 261 releases
wpfunnels / public / modules / checkout / class-wpfnl-order-bump-rules.php

class-wpfnl-order-bump-rules.php in WPFunnels – Funnel Builder for WooCommerce with Checkout & One Click Upsell 3.13.3, at public/modules/checkout/class-wpfnl-order-bump-rules.php

37 lines 1.2 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Order Bump Rules Evaluator (Compatibility Layer)
4 *
5 * This is a compatibility layer that redirects to the Pro version if available.
6 * Conditional rules are a Pro feature.
7 *
8 * @package WPFunnels\Modules\Frontend\Checkout
9 * @since 3.0.0
10 */
11
12 namespace WPFunnels\Modules\Frontend\Checkout;
13
14 class Wpfnl_Order_Bump_Rules {
15
16 /**
17 * Evaluate if order bump should be displayed based on rules
18 *
19 * @param array $order_bump_settings Order bump settings including ruleSettings
20 * @return bool True if should display, false otherwise
21 */
22 public static function should_display_order_bump( $order_bump_settings ) {
23 // Check if Pro version is available AND license is active
24 if ( class_exists( '\WPFunnelsPro\Modules\Frontend\Checkout\Wpfnl_Pro_Order_Bump_Rules' ) ) {
25 $license_status = get_option( 'wpfunnels_pro_license_status' );
26
27 // Only use Pro conditional rules if license is active
28 if ( 'active' === $license_status ) {
29 return \WPFunnelsPro\Modules\Frontend\Checkout\Wpfnl_Pro_Order_Bump_Rules::should_display_order_bump( $order_bump_settings );
30 }
31 }
32
33 // Pro not available or license inactive - always show order bump (conditional rules are a Pro feature)
34 return true;
35 }
36 }
37