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.4 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 All 262 releases
← All changes | admin/modules/createFunnel/class-wpfnl-create-funnel.php +13 -28 3.10.7 → 3.13.3 View file →
@@ -54,36 +54,18 @@
54 54 if ($is_store_checkout) {
55 55 update_post_meta( $funnel_id, '_wpfnl_funnel_type', 'store_checkout' );
56 56 $funnel_type = 'store_checkout';
57 57 } else {
58 - $general_settings = get_option( '_wpfunnels_general_settings' );
59 - if( isset($general_settings['funnel_type']) ){
60 - if( 'woocommerce' == $general_settings['funnel_type'] ){
61 - $general_settings['funnel_type'] = 'sales';
62 - update_option( '_wpfunnels_general_settings', $general_settings );
63 -
64 - }
65 -
66 - if( 'sales' == $general_settings['funnel_type'] ){
67 - // Check if LMS add-on is active AND at least one LMS plugin (LearnDash or CreatorLMS) is active
68 - if( Wpfnl_functions::is_lms_addon_active() && Wpfnl_functions::is_any_lms_plugin_active() && isset($payload['type']) && 'lms' === $payload['type'] ){
69 - update_post_meta( $funnel_id, '_wpfnl_funnel_type', 'lms' );
70 - $funnel_type = 'lms';
71 - }elseif( Wpfnl_functions::is_wc_active() && isset($payload['type']) && 'wc' === $payload['type'] ){
72 - update_post_meta( $funnel_id, '_wpfnl_funnel_type', 'wc' );
73 - $funnel_type = 'wc';
74 - }elseif( isset($payload['type']) && 'lead' === $payload['type'] ){
75 - update_post_meta( $funnel_id, '_wpfnl_funnel_type', 'lead' );
76 - $funnel_type = 'lead';
77 - }
78 -
79 - }else{
80 -
81 - if( isset($payload['type']) && 'lead' === $payload['type'] ){
82 - update_post_meta( $funnel_id, '_wpfnl_funnel_type', 'lead' );
83 - $funnel_type = 'lead';
84 - }
85 - }
58 + // Check if LMS add-on is active AND at least one LMS plugin (LearnDash or CreatorLMS) is active
59 + if( Wpfnl_functions::is_lms_addon_active() && Wpfnl_functions::is_any_lms_plugin_active() && isset($payload['type']) && 'lms' === $payload['type'] ){
60 + update_post_meta( $funnel_id, '_wpfnl_funnel_type', 'lms' );
61 + $funnel_type = 'lms';
62 + }elseif( Wpfnl_functions::is_wc_active() && isset($payload['type']) && 'wc' === $payload['type'] ){
63 + update_post_meta( $funnel_id, '_wpfnl_funnel_type', 'wc' );
64 + $funnel_type = 'wc';
65 + }elseif( isset($payload['type']) && 'lead' === $payload['type'] ){
66 + update_post_meta( $funnel_id, '_wpfnl_funnel_type', 'lead' );
67 + $funnel_type = 'lead';
86 68 }
87 69 }
88 70 }
89 71
@@ -112,8 +94,11 @@
112 94 admin_url('admin.php')
113 95 );
114 96
115 97 do_action('wpfunnels_after_funnel_created', $funnel_id, $funnel_type);
98 +
99 + // Flush rewrite rules so newly created funnel/step permalinks resolve immediately.
100 + flush_rewrite_rules();
116 101
117 102 return [
118 103 'success' => true,
119 104 'funnelID' => $funnel_id,