PluginProbe
WPFunnels – Funnel Builder for WooCommerce with Checkout & One Click Upsell / trunk
WPFunnels – Funnel Builder for WooCommerce with Checkout & One Click Upsell vtrunk
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 2.8.17 2.8.18 All 259 releases
wpfunnels / admin / modules / settings / views / offer-settings.php

offer-settings.php in WPFunnels – Funnel Builder for WooCommerce with Checkout & One Click Upsell trunk, at admin/modules/settings/views/offer-settings.php

305 lines 13.5 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * View offer settings
4 *
5 * @package
6 */
7
8 $offer_settings = \WPFunnels\Wpfnl_functions::get_offer_settings();
9
10 /**
11 * Skip Cart ships with the Global Funnel plan, the rest of this screen with any
12 * Pro plan. Every field renders either way so the options stay discoverable.
13 *
14 * A gated field is disabled and trades its tooltip for a description printed
15 * under the label, and each gated box closes with a single upgrade note. One
16 * note per tab rather than one per field: they all unlock together, so
17 * repeating the link beside every row only added noise.
18 */
19 $is_skip_cart_enabled = \WPFunnels\Wpfnl_functions::is_global_funnel_activated();
20 ?>
21
22 <div class="settings-tab-container">
23 <ul class="wpfnl-general-settings-tab-nav">
24 <li class="inner-tab active" data-tab="tab-skip-cart"><?php esc_html_e('Skip Cart Settings', 'wpfnl'); ?></li>
25 <li class="inner-tab" data-tab="tab-order-management"><?php esc_html_e('Order Management', 'wpfnl'); ?></li>
26 <li class="inner-tab" data-tab="tab-payment-management"><?php esc_html_e('Payment Management', 'wpfnl'); ?></li>
27 <li class="inner-tab" data-tab="tab-thank-you-page"><?php esc_html_e('Global Thank You', 'wpfnl'); ?></li>
28 </ul>
29 </div>
30
31 <!-- Skip Cart Settings Tab -->
32 <div class="wpfnl-tab-content active" id="tab-skip-cart">
33 <div class="wpfnl-box skip-cart-setting">
34 <div class="wpfnl-field-wrapper skip-cart-input-wrapper">
35 <label class="skip-cart-label">
36 <?php esc_html_e('Enable Skip Cart', 'wpfnl'); ?>
37 <?php if(!$is_skip_cart_enabled){ ?>
38 <span class="wpfnl-field-description"><?php esc_html_e('Send buyers straight from the product to the checkout page by skipping the cart.', 'wpfnl'); ?></span>
39 <?php } ?>
40 </label>
41 <div class="wpfnl-fields enable-skip-cart">
42 <span class="wpfnl-switcher extra-sm no-title">
43 <?php if($is_skip_cart_enabled){ ?>
44 <input type="checkbox" name="enable-skip-cart" id="enable-skip-cart" <?php if($this->general_settings['enable_skip_cart'] == 'on'){echo 'checked'; } ?>/>
45
46 <?php }else{ ?>
47 <input type="checkbox" name="" id="enable-skip-cart" disabled />
48 <?php } ?>
49 <label for="enable-skip-cart"></label>
50 </span>
51 </div>
52 </div>
53 <div class="wpfnl-skip-cart">
54 <div class="wpfnl-field-wrapper">
55 <label class="has-tooltip">
56 <?php esc_html_e('Skip Cart For The Entire Store', 'wpfnl'); ?>
57 <span class="wpfnl-tooltip">
58 <?php require WPFNL_DIR . '/admin/partials/icons/settings-tooltip-icon.php'; ?>
59 <p><?php esc_html_e('Select this option to enable Skip Cart for all products in your entire WooCommerce store and your funnels.', 'wpfnl'); ?></p>
60 </span>
61 </label>
62 <div class="wpfnl-fields">
63 <div class="wpfnl-radiobtn no-title">
64 <?php if($is_skip_cart_enabled){ ?>
65 <input type="radio" name="skip-cart" id="enable-skip-cart-for-whole" value="whole" <?php checked( $this->general_settings['skip_cart_for'], 'whole' ) ?>/>
66
67 <?php }else{ ?>
68 <input type="radio" name="" id="enable-skip-cart-for-whole" value="" disabled />
69 <?php } ?>
70 <label for="enable-skip-cart-for-whole"></label>
71 </div>
72 </div>
73 </div>
74 <!-- /field-wrapper -->
75
76 <div class="wpfnl-field-wrapper">
77 <label class="has-tooltip">
78 <?php esc_html_e('Skip Cart for Global Funnels Only', 'wpfnl'); ?>
79 <span class="wpfnl-tooltip">
80 <?php require WPFNL_DIR . '/admin/partials/icons/settings-tooltip-icon.php'; ?>
81 <p><?php esc_html_e("Select this option to enable Skip Cart only for products that meet your global funnels' conditions.", "wpfnl"); ?></p>
82 </span>
83 </label>
84 <div class="wpfnl-fields">
85 <div class="wpfnl-radiobtn no-title">
86 <?php if($is_skip_cart_enabled){ ?>
87 <input type="radio" name="skip-cart" id="enable-skip-cart-for-gbf" value="gbf" <?php checked( $this->general_settings['skip_cart_for'], 'gbf' ) ?>/>
88
89 <?php }else{ ?>
90 <input type="radio" name="" id="enable-skip-cart-for-gbf" value="" disabled />
91 <?php } ?>
92 <label for="enable-skip-cart-for-gbf"></label>
93 </div>
94 </div>
95 </div>
96 </div>
97 <!-- /field-wrapper -->
98
99 <?php if(!$is_skip_cart_enabled){
100 $pro_note_text = __('Skip Cart comes with the WPFunnels Global Funnel plan.', 'wpfnl');
101 $pro_note_utm = 'settings-offer-skip-cart';
102 require WPFNL_DIR . '/admin/partials/pro-note.php';
103 } ?>
104 </div>
105 </div>
106
107
108 <!-- Order Management Tab -->
109 <div class="wpfnl-tab-content" id="tab-order-management">
110 <div class="wpfnl-box order-management">
111 <div class="wpfnl-field-wrapper">
112 <label<?php echo $is_pro_activated ? ' class="has-tooltip"' : ''; ?>>
113 <?php esc_html_e('Create a new child order for every accepted Upsell/Downsell offer', 'wpfnl'); ?>
114 <?php if($is_pro_activated){ ?>
115 <span class="wpfnl-tooltip">
116 <?php require WPFNL_DIR . '/admin/partials/icons/settings-tooltip-icon.php'; ?>
117 <p><?php esc_html_e('Enabling this will create separate orders for every post-purchase offers you make.', 'wpfnl'); ?></p>
118 </span>
119 <?php }else{ ?>
120 <span class="wpfnl-field-description"><?php esc_html_e('Enabling this will create separate orders for every post-purchase offers you make.', 'wpfnl'); ?></span>
121 <?php } ?>
122 </label>
123 <div class="wpfnl-fields">
124 <div class="wpfnl-radiobtn no-title">
125 <?php if($is_pro_activated){ ?>
126 <input type="radio" name="offer-orders" id="wpfunnels-offer-child-order" value="child-order" <?php checked($offer_settings['offer_orders'], 'child-order') ?>/>
127
128 <?php }else{ ?>
129 <input type="radio" name="offer-orders" id="wpfunnels-offer-child-order" value="" disabled />
130 <?php } ?>
131
132 <label for="wpfunnels-offer-child-order"></label>
133 </div>
134 </div>
135 </div>
136 <!-- /field-wrapper -->
137
138 <div class="wpfnl-field-wrapper">
139 <label<?php echo $is_pro_activated ? ' class="has-tooltip"' : ''; ?>>
140 <?php esc_html_e('Add all accepted offers (Upsell/Downsell) to the main order', 'wpfnl'); ?>
141 <?php if($is_pro_activated){ ?>
142 <span class="wpfnl-tooltip">
143 <?php require WPFNL_DIR . '/admin/partials/icons/settings-tooltip-icon.php'; ?>
144 <p><?php esc_html_e('All purchases including main product, order bump, upsell(s), and downsell(s), will be included as part of a single order in WooCommerce.', 'wpfnl'); ?></p>
145 </span>
146 <?php }else{ ?>
147 <span class="wpfnl-field-description"><?php esc_html_e('All purchases including main product, order bump, upsell(s), and downsell(s), will be included as part of a single order in WooCommerce.', 'wpfnl'); ?></span>
148 <?php } ?>
149 </label>
150 <div class="wpfnl-fields">
151 <div class="wpfnl-radiobtn no-title">
152 <?php if($is_pro_activated){ ?>
153 <input type="radio" name="offer-orders" id="wpfunnels-offer-main-order" value="main-order" <?php checked($offer_settings['offer_orders'], 'main-order') ?>/>
154
155 <?php }else{ ?>
156 <input type="radio" name="" id="wpfunnels-offer-main-order" value="" disabled />
157 <?php } ?>
158
159 <label for="wpfunnels-offer-main-order"></label>
160 </div>
161 </div>
162 </div>
163 <!-- /field-wrapper -->
164
165 <?php if(!$is_pro_activated){
166 $pro_note_text = __('Order Management comes with WPFunnels Pro.', 'wpfnl');
167 $pro_note_utm = 'settings-offer-order-management';
168 require WPFNL_DIR . '/admin/partials/pro-note.php';
169 } ?>
170 </div>
171 </div>
172
173 <!-- Payment Management Tab -->
174 <div class="wpfnl-tab-content" id="tab-payment-management">
175 <div class="wpfnl-box payment-management">
176 <div class="wpfnl-field-wrapper">
177 <label<?php echo $is_pro_activated ? ' class="has-tooltip"' : ''; ?>>
178 <?php esc_html_e('Only show supported payment gateways during funnel checkout', 'wpfnl'); ?>
179 <?php if($is_pro_activated){ ?>
180 <span class="wpfnl-tooltip">
181 <?php require WPFNL_DIR . '/admin/partials/icons/settings-tooltip-icon.php'; ?>
182 <p><?php esc_html_e('You may have several payment gateways in your site. But since we have limited supported payment gateways for post purchase offers, you can use this option to only view supported payment gateways during the funnel checkout page. This means, you do not have to disable other payment gateways for the funnel.', 'wpfnl'); ?></p>
183 </span>
184 <?php }else{ ?>
185 <span class="wpfnl-field-description"><?php esc_html_e('Show only the payment gateways that support post-purchase offers on your funnel checkout.', 'wpfnl'); ?></span>
186 <?php } ?>
187 </label>
188 <div class="wpfnl-fields">
189 <span class="wpfnl-switcher extra-sm no-title">
190 <?php if($is_pro_activated){ ?>
191 <input type="checkbox" name="wpfnl-show-supported-payment-gateway"
192 id="wpfnl-show-supported-payment-gateway" <?php if ($this->offer_settings['show_supported_payment_gateway'] == 'on') { echo 'checked'; } ?>/>
193
194 <?php }else{ ?>
195 <input type="checkbox" name=""
196 id="wpfnl-show-supported-payment-gateway" disabled />
197 <?php } ?>
198
199 <label for="wpfnl-show-supported-payment-gateway"></label>
200 </span>
201 </div>
202 </div>
203 <!-- /field-wrapper -->
204
205 <div class="wpfnl-field-wrapper">
206 <label<?php echo $is_pro_activated ? ' class="has-tooltip"' : ''; ?>>
207 <?php esc_html_e('Skip upsell/downsell for unsupported payment gateways', 'wpfnl'); ?>
208 <?php if($is_pro_activated){ ?>
209 <span class="wpfnl-tooltip">
210 <?php require WPFNL_DIR . '/admin/partials/icons/settings-tooltip-icon.php'; ?>
211 <p><?php esc_html_e('Use this option so that if a buyer chooses to use a payment option that is not supported by WPFunnels, they will not get the post-purchase offers. This means, all payment options will be shown at the checkout page.', 'wpfnl'); ?></p>
212 </span>
213 <?php }else{ ?>
214 <span class="wpfnl-field-description"><?php esc_html_e('Keep every payment option at checkout and skip the offers when the buyer picks an unsupported one.', 'wpfnl'); ?></span>
215 <?php } ?>
216 </label>
217 <div class="wpfnl-fields">
218 <span class="wpfnl-switcher extra-sm no-title">
219 <?php if($is_pro_activated){ ?>
220 <input type="checkbox" name="wpfnl-skip-offer-step" id="wpfnl-skip-offer-step" <?php if ($this->offer_settings['skip_offer_step'] == 'on') { echo 'checked'; } ?>/>
221
222 <?php }else{ ?>
223 <input type="checkbox" name="" id="wpfnl-skip-offer-step" disabled />
224 <?php } ?>
225
226 <label for="wpfnl-skip-offer-step"></label>
227 </span>
228 </div>
229 </div>
230
231
232 <div class="wpfnl-field-wrapper">
233 <label<?php echo $is_pro_activated ? ' class="has-tooltip"' : ''; ?>>
234 <?php esc_html_e('Skip upsell/downsell for free products', 'wpfnl'); ?>
235 <?php if($is_pro_activated){ ?>
236 <span class="wpfnl-tooltip">
237 <?php require WPFNL_DIR . '/admin/partials/icons/settings-tooltip-icon.php'; ?>
238 <p><?php esc_html_e("Enable this option in case you want to use a $0 product as the main funnel product. In this case, Upsell and downsell steps will be skipped since they won't work without a successful payment during checkout.", 'wpfnl'); ?></p>
239 </span>
240 <?php }else{ ?>
241 <span class="wpfnl-field-description"><?php esc_html_e('Skip the upsell and downsell steps when the main funnel product is free.', 'wpfnl'); ?></span>
242 <?php } ?>
243 </label>
244 <div class="wpfnl-fields">
245 <span class="wpfnl-switcher extra-sm no-title">
246 <?php if($is_pro_activated){ ?>
247 <input type="checkbox" name="wpfnl-skip-offer-step-for-free" id="wpfnl-skip-offer-step-for-free" <?php if ($this->offer_settings['skip_offer_step_for_free'] == 'on') { echo 'checked'; } ?>/>
248
249 <?php }else{ ?>
250 <input type="checkbox" name="" id="wpfnl-skip-offer-step-for-free" disabled />
251
252 <?php } ?>
253 <label for="wpfnl-skip-offer-step-for-free"></label>
254 </span>
255 </div>
256 </div>
257 <!-- /field-wrapper -->
258
259 <?php if(!$is_pro_activated){
260 $pro_note_text = __('Payment Management comes with WPFunnels Pro.', 'wpfnl');
261 $pro_note_utm = 'settings-offer-payment-management';
262 require WPFNL_DIR . '/admin/partials/pro-note.php';
263 } ?>
264 </div>
265 </div>
266 <!-- /settings-box -->
267
268 <!-- Thank You Page Tab -->
269 <div class="wpfnl-tab-content" id="tab-thank-you-page">
270 <div class="wpfnl-box payment-management">
271 <div class="wpfnl-field-wrapper">
272 <label<?php echo $is_pro_activated ? ' class="has-tooltip"' : ''; ?>>
273 <?php esc_html_e('Enable global thank you', 'wpfnl'); ?>
274 <?php if($is_pro_activated){ ?>
275 <span class="wpfnl-tooltip">
276 <?php require WPFNL_DIR . '/admin/partials/icons/settings-tooltip-icon.php'; ?>
277 <p><?php esc_html_e('Enable this option to redirect users to the WooCommerce order confirmation page for all funnels. If disabled, each funnel will use its own thank you page.', 'wpfnl'); ?></p>
278 </span>
279 <?php }else{ ?>
280 <span class="wpfnl-field-description"><?php esc_html_e('Send buyers of every funnel to the WooCommerce order confirmation page instead of a per-funnel thank you page.', 'wpfnl'); ?></span>
281 <?php } ?>
282 </label>
283 <div class="wpfnl-fields">
284 <span class="wpfnl-switcher extra-sm no-title">
285
286 <?php if($is_pro_activated){ ?>
287 <input type="checkbox" name="wpfnl-enable-global-thankyou" id="wpfnl-enable-global-thankyou" <?php if ($this->offer_settings['enable_global_thankyou'] == 'on') { echo 'checked'; } ?>/>
288
289 <?php }else{ ?>
290 <input type="checkbox" name="" id="wpfnl-enable-global-thankyou" disabled />
291 <?php } ?>
292 <label for="wpfnl-enable-global-thankyou"></label>
293 </span>
294 </div>
295 </div>
296 <!-- /field-wrapper -->
297
298 <?php if(!$is_pro_activated){
299 $pro_note_text = __('Global Thank You comes with WPFunnels Pro.', 'wpfnl');
300 $pro_note_utm = 'settings-offer-global-thank-you';
301 require WPFNL_DIR . '/admin/partials/pro-note.php';
302 } ?>
303 </div>
304 </div>
305