← All changes
|
admin/modules/template-library/sources/remote.php
+7
-20
3.10.8
→
3.13.3
View file →
| @@ -97,28 +97,15 @@ | ||
| 97 | 97 | update_post_meta( $funnel_id, '_wpfnl_funnel_type', 'store_checkout' ); |
| 98 | 98 | $funnel->update_meta( $funnel_id, '_is_store_checkout', 'yes' ); |
| 99 | 99 | } else { |
| 100 | 100 | if( $funnel_id ){ |
| 101 | - | |
| 102 | - if( isset( $general_settings['funnel_type'] ) ){ | |
| 103 | - if( 'woocommerce' == $general_settings['funnel_type'] ){ | |
| 104 | - $general_settings['funnel_type'] = 'sales'; | |
| 105 | - update_option( '_wpfunnels_general_settings', $general_settings ); | |
| 106 | - } | |
| 107 | - if( 'sales' == $general_settings['funnel_type'] ){ | |
| 108 | - // Check if LMS add-on is active AND at least one LMS plugin (LearnDash or CreatorLMS) is active | |
| 109 | - if( Wpfnl_functions::is_lms_addon_active() && Wpfnl_functions::is_any_lms_plugin_active() && isset($args['type']) && 'lms' === $args['type'] ){ | |
| 110 | - update_post_meta( $funnel_id, '_wpfnl_funnel_type', 'lms' ); | |
| 111 | - } elseif( Wpfnl_functions::is_wc_active() && isset($args['type']) && 'wc' === $args['type'] ){ | |
| 112 | - update_post_meta( $funnel_id, '_wpfnl_funnel_type', 'wc' ); | |
| 113 | - } elseif( isset($args['type']) && 'lead' === $args['type'] ){ | |
| 114 | - update_post_meta( $funnel_id, '_wpfnl_funnel_type', 'lead' ); | |
| 115 | - } | |
| 116 | - }else{ | |
| 117 | - if( isset($args['type']) && 'lead' === $args['type'] ){ | |
| 118 | - update_post_meta( $funnel_id, '_wpfnl_funnel_type', 'lead' ); | |
| 119 | - } | |
| 120 | - } | |
| 101 | + // Check if LMS add-on is active AND at least one LMS plugin (LearnDash or CreatorLMS) is active | |
| 102 | + if( Wpfnl_functions::is_lms_addon_active() && Wpfnl_functions::is_any_lms_plugin_active() && isset($args['type']) && 'lms' === $args['type'] ){ | |
| 103 | + update_post_meta( $funnel_id, '_wpfnl_funnel_type', 'lms' ); | |
| 104 | + } elseif( Wpfnl_functions::is_wc_active() && isset($args['type']) && 'wc' === $args['type'] ){ | |
| 105 | + update_post_meta( $funnel_id, '_wpfnl_funnel_type', 'wc' ); | |
| 106 | + } elseif( isset($args['type']) && 'lead' === $args['type'] ){ | |
| 107 | + update_post_meta( $funnel_id, '_wpfnl_funnel_type', 'lead' ); | |
| 121 | 108 | } |
| 122 | 109 | } |
| 123 | 110 | } |
| 124 | 111 | |