PluginProbe
Product Labels, Quick View, Buy Now, Pre-Orders, Frequently Bought Together & More for WooCommerce – Merchant / 1.10.2
Product Labels, Quick View, Buy Now, Pre-Orders, Frequently Bought Together & More for WooCommerce – Merchant v1.10.2
2.3.2 2.3.1 2.3.0 2.2.8 2.2.7 trunk 1.10.0 1.10.1 1.10.2 1.10.3 1.10.4 1.10.5 1.11.0 1.11.1 1.11.2 1.6 1.7 1.8 1.8.1 1.8.2 1.8.3 1.9.0 1.9.1 1.9.10 1.9.11 All 60 releases
merchant / admin / classes / class-merchant-admin-modules.php

class-merchant-admin-modules.php in Product Labels, Quick View, Buy Now, Pre-Orders, Frequently Bought Together & More for WooCommerce – Merchant 1.10.2, at admin/classes/class-merchant-admin-modules.php

527 lines 23.6 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Merchant_Admin_Modules Class.
4 */
5
6 if ( ! defined( 'ABSPATH' ) ) {
7 exit; // Exit if accessed directly
8 }
9
10 if ( ! class_exists( 'Merchant_Admin_Modules' ) ) {
11
12 class Merchant_Admin_Modules {
13
14 /**
15 * Upsell modules.
16 *
17 */
18 public static $modules_data = array();
19
20 /**
21 * The single class instance.
22 */
23 private static $instance = null;
24
25 /**
26 * Instance.
27 */
28 public static function instance() {
29 if ( is_null( self::$instance ) ) {
30 self::$instance = new self();
31 }
32 return self::$instance;
33 }
34
35 /**
36 * Constructor.
37 */
38 public function __construct() {
39 self::$modules_data = array(
40
41 // Boost Revenue.
42 'pre-orders' => array(
43 'pro' => false,
44 'section' => 'boost-revenue',
45 'icon' => Merchant_SVG_Icons::get_svg_icon( 'module-pre-orders' ),
46 'title' => esc_html__( 'Pre-Orders', 'merchant' ),
47 'desc' => esc_html__( 'Allow visitors to pre-order products that are either out of stock or not yet released', 'merchant' ),
48 'tutorial_url' => 'https://docs.athemes.com/article/pre-orders/',
49 ),
50 'wait-list' => array(
51 'pro' => true,
52 'section' => 'boost-revenue',
53 'icon' => Merchant_SVG_Icons::get_svg_icon( 'module-wait-list' ),
54 'title' => esc_html__( 'Waitlist', 'merchant' ),
55 'desc' => esc_html__( 'Build waitlists for sold-out items and auto-notify potential customers when items are restocked', 'merchant' ),
56 'tutorial_url' => 'https://docs.athemes.com/article/merchant-waitlist/',
57 ),
58 'product-bundles' => array(
59 'pro' => true,
60 'section' => 'boost-revenue',
61 'icon' => Merchant_SVG_Icons::get_svg_icon( 'module-product-bundles' ),
62 'title' => esc_html__( 'Product Bundles', 'merchant' ),
63 'desc' => esc_html__( 'Create bundles of products to be sold together and boost your average order value', 'merchant' ),
64 'tutorial_url' => 'https://docs.athemes.com/article/merchant-product-bundles/',
65 ),
66 'frequently-bought-together' => array(
67 'pro' => true,
68 'section' => 'boost-revenue',
69 'icon' => Merchant_SVG_Icons::get_svg_icon( 'module-frequently-bought-together' ),
70 'title' => esc_html__( 'Frequently Bought Together', 'merchant' ),
71 'desc' => esc_html__( 'Create bundles of related products that customers can add to their cart with just one click', 'merchant' ),
72 'tutorial_url' => 'https://docs.athemes.com/article/merchant-frequently-bought-together/',
73 ),
74 'buy-x-get-y' => array(
75 'pro' => true,
76 'section' => 'boost-revenue',
77 'icon' => Merchant_SVG_Icons::get_svg_icon( 'module-buy-x-get-y' ),
78 'title' => esc_html__( 'Buy X, Get Y', 'merchant' ),
79 'desc' => esc_html__( 'Create offers where purchasing a specific quantity of Product X triggers a discount on Product Y', 'merchant' ),
80 'tutorial_url' => 'https://docs.athemes.com/article/merchant-buy-x-get-y/',
81 ),
82 'volume-discounts' => array(
83 'pro' => true,
84 'section' => 'boost-revenue',
85 'icon' => Merchant_SVG_Icons::get_svg_icon( 'module-volume-discounts' ),
86 'title' => esc_html__( 'Bulk Discounts', 'merchant' ),
87 'desc' => esc_html__( 'Offer discounts on larger quantity purchases to drive up average order value', 'merchant' ),
88 'tutorial_url' => 'https://docs.athemes.com/article/merchant-bulk-discounts/',
89 ),
90 'storewide-sale' => array(
91 'pro' => true,
92 'section' => 'boost-revenue',
93 'icon' => Merchant_SVG_Icons::get_svg_icon( 'module-storewide-sale' ),
94 'title' => esc_html__( 'Storewide Sale', 'merchant' ),
95 'desc' => esc_html__( 'Create discount campaigns for all your products, specific categories, or specific products', 'merchant' ),
96 'tutorial_url' => 'https://docs.athemes.com/article/merchant-storewide-sale/',
97 ),
98 'spending-goal' => array(
99 'pro' => true,
100 'section' => 'boost-revenue',
101 'icon' => Merchant_SVG_Icons::get_svg_icon( 'module-spending-goal' ),
102 'title' => esc_html__( 'Spending Discount Goal', 'merchant' ),
103 'desc' => esc_html__( 'Motivate higher order values by offering customers discounts for reaching spending goals', 'merchant' ),
104 'tutorial_url' => 'https://docs.athemes.com/article/merchant-spending-goal/',
105 ),
106 'free-gifts' => array(
107 'pro' => true,
108 'section' => 'boost-revenue',
109 'icon' => Merchant_SVG_Icons::get_svg_icon( 'module-free-gifts' ),
110 'title' => esc_html__( 'Free Gifts', 'merchant' ),
111 'desc' => esc_html__( 'Reward shoppers with a gift if they hit a specified spending target or apply a coupon', 'merchant' ),
112 'tutorial_url' => 'https://docs.athemes.com/article/merchant-gift-card/',
113 ),
114 'free-shipping-progress-bar' => array(
115 'pro' => true,
116 'section' => 'boost-revenue',
117 'icon' => Merchant_SVG_Icons::get_svg_icon( 'free-shipping-progress-bar' ),
118 'title' => esc_html__( 'Free Shipping Bar', 'merchant' ),
119 'desc' => esc_html__( 'Encourage customers to spend more by displaying the amount left needed for free shipping', 'merchant' ),
120 'tutorial_url' => 'https://docs.athemes.com/article/merchant-free-shipping-progress-bar/',
121 ),
122 // Increase Conversion Rates (Convert More).
123 'product-labels' => array(
124 'pro' => false,
125 'section' => 'convert-more',
126 'icon' => Merchant_SVG_Icons::get_svg_icon( 'module-product-labels' ),
127 'title' => esc_html__( 'Product Labels', 'merchant' ),
128 'desc' => esc_html__( 'Create customizable product labels with display conditions and color settings', 'merchant' ),
129 'tutorial_url' => 'https://docs.athemes.com/article/product-labels/',
130 ),
131 'quick-view' => array(
132 'pro' => false,
133 'section' => 'convert-more',
134 'icon' => Merchant_SVG_Icons::get_svg_icon( 'module-quick-view' ),
135 'title' => esc_html__( 'Quick View', 'merchant' ),
136 'desc' => esc_html__( 'Allows users to quickly view product details without leaving the current page', 'merchant' ),
137 'tutorial_url' => 'https://docs.athemes.com/article/quick-view/',
138 ),
139 'added-to-cart-popup' => array(
140 'pro' => true,
141 'section' => 'convert-more',
142 'icon' => Merchant_SVG_Icons::get_svg_icon( 'added-to-cart-popup' ),
143 'title' => esc_html__( 'Added To Cart Popup', 'merchant' ),
144 'desc' => esc_html__( 'Display a dynamic popup with product suggestions when items are added to the cart', 'merchant' ),
145 'tutorial_url' => 'https://docs.athemes.com/article/merchant-added-to-cart-popup/',
146 ),
147 'countdown-timer' => array(
148 'pro' => true,
149 'section' => 'convert-more',
150 'icon' => Merchant_SVG_Icons::get_svg_icon( 'module-countdown-timer' ),
151 'title' => esc_html__( 'Countdown Timer', 'merchant' ),
152 'desc' => esc_html__( 'Create a sense of urgency by displaying a countdown timer on your discounted products', 'merchant' ),
153 'tutorial_url' => 'https://docs.athemes.com/article/merchant-countdown-timer/',
154 ),
155 'stock-scarcity' => array(
156 'pro' => true,
157 'section' => 'convert-more',
158 'icon' => Merchant_SVG_Icons::get_svg_icon( 'module-stock-scarcity' ),
159 'title' => esc_html__( 'Stock Scarcity', 'merchant' ),
160 'desc' => esc_html__( 'Let visitors know that stock is running low on products they are looking at', 'merchant' ),
161 'tutorial_url' => 'https://docs.athemes.com/article/merchant-stock-scarcity/',
162 ),
163 'checkout' => array(
164 'pro' => true,
165 'section' => 'convert-more',
166 'icon' => Merchant_SVG_Icons::get_svg_icon( 'module-checkout' ),
167 'title' => esc_html__( 'Checkouts', 'merchant' ),
168 'desc' => esc_html__( 'Choose from three different checkout layouts: Shopify-style, Multi-step or One-page', 'merchant' ),
169 'tutorial_url' => 'https://docs.athemes.com/article/merchant-checkouts/',
170 ),
171 'sticky-add-to-cart' => array(
172 'pro' => true,
173 'section' => 'convert-more',
174 'icon' => Merchant_SVG_Icons::get_svg_icon( 'module-sticky-add-to-cart' ),
175 'title' => esc_html__( 'Sticky Add To Cart', 'merchant' ),
176 'desc' => esc_html__( 'Display a sticky add to cart bar when visitors are scrolling on your product pages', 'merchant' ),
177 'tutorial_url' => 'https://docs.athemes.com/article/merchant-sticky-add-to-cart/',
178 ),
179 'recently-viewed-products' => array(
180 'pro' => true,
181 'section' => 'convert-more',
182 'icon' => Merchant_SVG_Icons::get_svg_icon( 'module-recently-viewed-products' ),
183 'title' => esc_html__( 'Recently Viewed Products', 'merchant' ),
184 'desc' => esc_html__( 'Show recently viewed products on product pages and in the cart', 'merchant' ),
185 'tutorial_url' => 'https://docs.athemes.com/article/merchant-recently-viewed-products/',
186 ),
187
188 // Boost Revenue.
189
190 // Reduce Cart Abandonment.
191 'buy-now' => array(
192 'pro' => false,
193 'section' => 'reduce-abandonment',
194 'icon' => Merchant_SVG_Icons::get_svg_icon( 'module-buy-now' ),
195 'title' => esc_html__( 'Buy Now', 'merchant' ),
196 'desc' => esc_html__( 'Send your customers directly to checkout instead of the cart with Buy Now buttons', 'merchant' ),
197 'tutorial_url' => 'https://docs.athemes.com/article/buy-now/',
198 ),
199 'cart-count-favicon' => array(
200 'pro' => false,
201 'section' => 'reduce-abandonment',
202 'icon' => Merchant_SVG_Icons::get_svg_icon( 'module-cart-count-favicon' ),
203 'title' => esc_html__( 'Cart Count Favicon', 'merchant' ),
204 'desc' => esc_html__( 'Make your browser tab stand out by showing the number of items in the cart on the favicon', 'merchant' ),
205 'tutorial_url' => 'https://docs.athemes.com/article/cart-count-favicon/',
206 ),
207 'inactive-tab-message' => array(
208 'pro' => false,
209 'section' => 'reduce-abandonment',
210 'icon' => Merchant_SVG_Icons::get_svg_icon( 'module-inactive-tab-message' ),
211 'title' => esc_html__( 'Inactive Tab Message', 'merchant' ),
212 'desc' => esc_html__( 'Modify the browser tab\'s title when the visitor navigates away from your store', 'merchant' ),
213 'tutorial_url' => 'https://docs.athemes.com/article/merchant-inactive-tab-message/',
214 ),
215 'cart-reserved-timer' => array(
216 'pro' => true,
217 'section' => 'reduce-abandonment',
218 'icon' => Merchant_SVG_Icons::get_svg_icon( 'module-cart-reserved-timer' ),
219 'title' => esc_html__( 'Cart Reserved Timer', 'merchant' ),
220 'desc' => esc_html__( 'Create urgency by letting visitors know that the products in cart are reserved for a limited time', 'merchant' ),
221 'tutorial_url' => 'https://docs.athemes.com/article/merchant-cart-reserved-timer/',
222 ),
223 'floating-mini-cart' => array(
224 'pro' => true,
225 'section' => 'reduce-abandonment',
226 'icon' => Merchant_SVG_Icons::get_svg_icon( 'module-floating-mini-cart' ),
227 'title' => esc_html__( 'Floating Mini Cart', 'merchant' ),
228 'desc' => esc_html__( 'A cart icon will always be visible and a sliding cart when the customer clicks it', 'merchant' ),
229 'tutorial_url' => 'https://docs.athemes.com/article/merchant-floating-mini-cart/',
230 ),
231 'side-cart' => array(
232 'pro' => true,
233 'section' => 'reduce-abandonment',
234 'icon' => Merchant_SVG_Icons::get_svg_icon( 'module-side-cart' ),
235 'title' => esc_html__( 'Side Cart', 'merchant' ),
236 'desc' => esc_html__( 'Show a sliding cart whenever a customer adds a product to the cart', 'merchant' ),
237 'tutorial_url' => 'https://docs.athemes.com/article/merchant-side-cart/',
238 ),
239
240 // Build Trust.
241 'payment-logos' => array(
242 'pro' => false,
243 'section' => 'build-trust',
244 'icon' => Merchant_SVG_Icons::get_svg_icon( 'module-payment-logos' ),
245 'title' => esc_html__( 'Payment Logos', 'merchant' ),
246 'desc' => esc_html__( 'Display the logos of the payment methods you accept on product pages', 'merchant' ),
247 'tutorial_url' => 'https://docs.athemes.com/article/payment-logos/',
248 ),
249 'trust-badges' => array(
250 'pro' => false,
251 'section' => 'build-trust',
252 'icon' => Merchant_SVG_Icons::get_svg_icon( 'module-trust-badges' ),
253 'title' => esc_html__( 'Trust Badges', 'merchant' ),
254 'desc' => esc_html__( 'Reassure customers by showcasing different badge-shaped store benefits', 'merchant' ),
255 'tutorial_url' => 'https://docs.athemes.com/article/trust-badges/',
256 ),
257 'advanced-reviews' => array(
258 'pro' => true,
259 'section' => 'build-trust',
260 'icon' => Merchant_SVG_Icons::get_svg_icon( 'module-advanced-reviews' ),
261 'title' => esc_html__( 'Advanced Reviews', 'merchant' ),
262 'desc' => esc_html__( 'Enhance your customer reviews with advanced features including photo uploads and more', 'merchant' ),
263 'tutorial_url' => 'https://docs.athemes.com/article/merchant-advanced-reviews/',
264 ),
265 'reasons-to-buy' => array(
266 'pro' => true,
267 'section' => 'build-trust',
268 'icon' => Merchant_SVG_Icons::get_svg_icon( 'module-reasons-to-buy' ),
269 'title' => esc_html__( 'Reasons To Buy List', 'merchant' ),
270 'desc' => esc_html__( 'Provide customers with a summary of the key features and benefits of your products', 'merchant' ),
271 'tutorial_url' => 'https://docs.athemes.com/article/merchant-reasons-to-buy/',
272 ),
273 'quick-social-links' => array(
274 'pro' => true,
275 'section' => 'build-trust',
276 'icon' => Merchant_SVG_Icons::get_svg_icon( 'module-quick-social-links' ),
277 'title' => esc_html__( 'Quick Social Links', 'merchant' ),
278 'desc' => esc_html__( 'Display floating social media icons to make it easier for your customers to connect with you', 'merchant' ),
279 'tutorial_url' => 'https://docs.athemes.com/article/merchant-quick-social-links/',
280 ),
281 'product-brand-image' => array(
282 'pro' => true,
283 'section' => 'build-trust',
284 'icon' => Merchant_SVG_Icons::get_svg_icon( 'module-product-brand-image' ),
285 'title' => esc_html__( 'Product Brand Image', 'merchant' ),
286 'desc' => esc_html__( 'Add brand images to products to instill confidence in potential buyers', 'merchant' ),
287 'tutorial_url' => 'https://docs.athemes.com/article/merchant-product-brand-image/',
288 ),
289
290 // Improve User Experience.
291 'animated-add-to-cart' => array(
292 'pro' => false,
293 'section' => 'improve-experience',
294 'icon' => Merchant_SVG_Icons::get_svg_icon( 'module-animated-add-to-cart' ),
295 'title' => esc_html__( 'Animated Add to Cart', 'merchant' ),
296 'desc' => esc_html__( 'Make your Add To Cart button stand out by adding an animation on mouse over or page load', 'merchant' ),
297 'tutorial_url' => 'https://docs.athemes.com/article/animated-add-to-cart/',
298 ),
299 'add-to-cart-text' => array(
300 'pro' => false,
301 'section' => 'improve-experience',
302 'icon' => Merchant_SVG_Icons::get_svg_icon( 'module-add-to-cart-text' ),
303 'title' => esc_html__( 'Add To Cart Text', 'merchant' ),
304 'desc' => esc_html__( 'Change your store\'s \'Add to Cart\' text for various product types, as well as individual products', 'merchant' ),
305 'tutorial_url' => 'https://docs.athemes.com/article/merchant-add-to-cart-text/',
306 ),
307 'auto-external-links' => array(
308 'pro' => false,
309 'section' => 'improve-experience',
310 'icon' => Merchant_SVG_Icons::get_svg_icon( 'module-auto-external-links' ),
311 'title' => esc_html__( 'Auto External Links', 'merchant' ),
312 'desc' => esc_html__( 'Keep users from navigating away from your store by opening external links in a new browser tab', 'merchant' ),
313 'tutorial_url' => 'https://docs.athemes.com/article/auto-external-links/',
314 ),
315 'real-time-search' => array(
316 'pro' => false,
317 'section' => 'improve-experience',
318 'icon' => Merchant_SVG_Icons::get_svg_icon( 'module-real-time-search' ),
319 'title' => esc_html__( 'Real-Time Search', 'merchant' ),
320 'desc' => esc_html__( 'Help visitors instantly find the products they\'re looking for by using predictive search', 'merchant' ),
321 'tutorial_url' => 'https://docs.athemes.com/article/real-time-search/',
322 ),
323 'code-snippets' => array(
324 'pro' => false,
325 'section' => 'improve-experience',
326 'icon' => Merchant_SVG_Icons::get_svg_icon( 'module-code-snippets' ),
327 'title' => esc_html__( 'Code Snippets', 'merchant' ),
328 'desc' => esc_html__( 'Add code snippets in WordPress without having to edit your theme\'s functions.php file ', 'merchant' ),
329 'tutorial_url' => 'https://docs.athemes.com/article/code-snippets/',
330 ),
331 'scroll-to-top-button' => array(
332 'pro' => false,
333 'section' => 'improve-experience',
334 'icon' => Merchant_SVG_Icons::get_svg_icon( 'module-scroll-to-top-button' ),
335 'title' => esc_html__( 'Scroll to Top Button', 'merchant' ),
336 'desc' => esc_html__( 'Help your customers get back easily to the top of the page with a single click', 'merchant' ),
337 'tutorial_url' => 'https://docs.athemes.com/article/scroll-to-top-button/',
338 ),
339 'address-autocomplete' => array(
340 'pro' => true,
341 'section' => 'improve-experience',
342 'icon' => Merchant_SVG_Icons::get_svg_icon( 'google-autocomplete' ),
343 'title' => esc_html__( 'Google Address Autocomplete', 'merchant' ),
344 'desc' => esc_html__( 'Streamline your checkout process and reduce user errors by autocompleting the address fields', 'merchant' ),
345 'tutorial_url' => 'https://docs.athemes.com/article/merchant-google-address-autocomplete/',
346 ),
347 'size-chart' => array(
348 'pro' => true,
349 'section' => 'improve-experience',
350 'icon' => Merchant_SVG_Icons::get_svg_icon( 'module-size-chart' ),
351 'title' => esc_html__( 'Size Chart', 'merchant' ),
352 'desc' => esc_html__( 'Reduce returns and increase sales by showing a size chart on specific products or all products', 'merchant' ),
353 'tutorial_url' => 'https://docs.athemes.com/article/merchant-size-chart/',
354 ),
355 'product-swatches' => array(
356 'pro' => true,
357 'section' => 'improve-experience',
358 'icon' => Merchant_SVG_Icons::get_svg_icon( 'module-product-swatches' ),
359 'title' => esc_html__( 'Variation Swatches', 'merchant' ),
360 'desc' => esc_html__( 'Display variable product options as customizable color/image icons, buttons, or dropdowns', 'merchant' ),
361 'tutorial_url' => 'https://docs.athemes.com/article/merchant-variation-swatches/',
362 ),
363 'wishlist' => array(
364 'pro' => true,
365 'section' => 'improve-experience',
366 'icon' => Merchant_SVG_Icons::get_svg_icon( 'module-wishlist' ),
367 'title' => esc_html__( 'Wishlist', 'merchant' ),
368 'desc' => esc_html__( 'Allow customers to easily save products they are interested in for later', 'merchant' ),
369 'tutorial_url' => 'https://docs.athemes.com/article/merchant-wishlist/',
370 ),
371 'product-navigation-links' => array(
372 'pro' => true,
373 'section' => 'improve-experience',
374 'icon' => Merchant_SVG_Icons::get_svg_icon( 'module-product-navigation-links' ),
375 'title' => esc_html__( 'Product Navigation Links', 'merchant' ),
376 'desc' => esc_html__( 'Enable easy navigation from one product to the next with next/previous links', 'merchant' ),
377 'tutorial_url' => 'https://docs.athemes.com/article/merchant-product-navigation-links/',
378 ),
379 'product-video' => array(
380 'pro' => true,
381 'section' => 'improve-experience',
382 'icon' => Merchant_SVG_Icons::get_svg_icon( 'module-product-video' ),
383 'title' => esc_html__( 'Product Video', 'merchant' ),
384 'desc' => esc_html__( 'Upload video to be viewed in product galleries and on archive pages', 'merchant' ),
385 'tutorial_url' => 'https://docs.athemes.com/article/merchant-product-video/',
386 ),
387 'product-audio' => array(
388 'pro' => true,
389 'section' => 'improve-experience',
390 'icon' => Merchant_SVG_Icons::get_svg_icon( 'module-product-audio' ),
391 'title' => esc_html__( 'Product Audio', 'merchant' ),
392 'desc' => esc_html__( 'Upload audio to be listened to in product galleries and on archive pages', 'merchant' ),
393 'tutorial_url' => 'https://docs.athemes.com/article/merchant-product-audio/',
394 ),
395 'login-popup' => array(
396 'pro' => true,
397 'section' => 'improve-experience',
398 'icon' => Merchant_SVG_Icons::get_svg_icon( 'module-login-popup' ),
399 'title' => esc_html__( 'Login Popup', 'merchant' ),
400 'desc' => esc_html__( 'Allow users to log in with a simple pop up without navigating to a new page', 'merchant' ),
401 'tutorial_url' => 'https://docs.athemes.com/article/merchant-login-popup/',
402 ),
403 'clear-cart' => array(
404 'pro' => false,
405 'section' => 'improve-experience',
406 'icon' => Merchant_SVG_Icons::get_svg_icon( 'module-clear-cart' ),
407 'title' => esc_html__( 'Clear Cart', 'merchant' ),
408 'desc' => esc_html__( 'Display a clear cart button to let customers empty their carts and start fresh', 'merchant' ),
409 'tutorial_url' => 'https://docs.athemes.com/article/merchant-clear-cart/',
410 ),
411
412 // Protect Your Store.
413 'agree-to-terms-checkbox' => array(
414 'pro' => false,
415 'section' => 'protect-your-store',
416 'icon' => Merchant_SVG_Icons::get_svg_icon( 'module-agree-to-terms-checkbox' ),
417 'title' => esc_html__( 'Agree to Terms Checkbox', 'merchant' ),
418 'desc' => esc_html__( 'Get customers to agree to your Terms & Conditions as part of the checkout process', 'merchant' ),
419 'tutorial_url' => 'https://docs.athemes.com/article/agree-to-terms-checkbox/',
420 ),
421 'cookie-banner' => array(
422 'pro' => false,
423 'section' => 'protect-your-store',
424 'icon' => Merchant_SVG_Icons::get_svg_icon( 'module-cookie-banner' ),
425 'title' => esc_html__( 'Cookie Banner', 'merchant' ),
426 'desc' => esc_html__( 'Inform your visitors that the site uses cookies via a dismissable banner', 'merchant' ),
427 'tutorial_url' => 'https://docs.athemes.com/article/cookie-banner/',
428 ),
429 );
430 }
431
432 /**
433 * Get modules.
434 */
435 public static function get_modules() {
436
437 $modules = array(
438
439 'boost-revenue' => array(
440 'title' => esc_html__( 'Boost Revenue', 'merchant' ),
441 'modules' => array(),
442 ),
443
444 'convert-more' => array(
445 'title' => esc_html__( 'Convert More', 'merchant' ),
446 'modules' => array(),
447 ),
448
449 'reduce-abandonment' => array(
450 'title' => esc_html__( 'Reduce Cart Abandonment', 'merchant' ),
451 'modules' => array(),
452 ),
453
454 'build-trust' => array(
455 'title' => esc_html__( 'Build Trust', 'merchant' ),
456 'modules' => array(),
457 ),
458
459 'improve-experience' => array(
460 'title' => esc_html__( 'Improve Experience', 'merchant' ),
461 'modules' => array(),
462 ),
463
464 'protect-your-store' => array(
465 'title' => esc_html__( 'Protect Store', 'merchant' ),
466 'modules' => array(),
467 ),
468
469 );
470
471 /**
472 * Hook: merchant_modules
473 *
474 * @since 1.0
475 */
476 $modules = apply_filters( 'merchant_modules', $modules );
477
478 return $modules;
479 }
480
481 /**
482 * Get upsell modules.
483 *
484 */
485 public static function get_upsell_modules() {
486 return array_filter( self::$modules_data, function( $module ){
487 return isset( $module[ 'pro' ] ) && $module[ 'pro' ] ? $module : false;
488 } );
489 }
490
491 /**
492 * Add upsell to modules.
493 *
494 */
495 public static function add_upsell_modules( $modules ) {
496 if ( defined( 'MERCHANT_PRO_VERSION' ) ) {
497 return $modules;
498 }
499
500 foreach ( self::get_upsell_modules() as $module_id => $module_data ) {
501 $modules[ $module_data[ 'section' ] ][ 'modules' ][ $module_id ] = $module_data;
502 }
503
504 return $modules;
505 }
506
507 /**
508 * Get module info.
509 */
510 public static function get_module_info( $module ) {
511
512 $modules = self::get_modules();
513
514 $maybe_found = array_column( array_column( $modules, 'modules' ), $module );
515
516 if ( ! empty( $maybe_found ) && ! empty( $maybe_found[0] ) ) {
517 return $maybe_found[0];
518 }
519
520 return false;
521 }
522 }
523
524 Merchant_Admin_Modules::instance();
525
526 }
527