| @@ -1,482 +1,694 @@ | ||
| 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 | - // Convert More. | |
| 42 | - 'buy-now' => array( | |
| 43 | - 'pro' => false, | |
| 44 | - 'section' => 'convert-more', | |
| 45 | - 'icon' => Merchant_SVG_Icons::get_svg_icon( 'module-buy-now' ), | |
| 46 | - 'title' => esc_html__( 'Buy Now', 'merchant' ), | |
| 47 | - 'desc' => esc_html__( 'Send your customers directly to checkout instead of the cart with Buy Now buttons', 'merchant' ), | |
| 48 | - 'tutorial_url' => 'https://docs.athemes.com/article/buy-now/' | |
| 49 | - ), | |
| 50 | - 'animated-add-to-cart' => array( | |
| 51 | - 'pro' => false, | |
| 52 | - 'section' => 'convert-more', | |
| 53 | - 'icon' => Merchant_SVG_Icons::get_svg_icon( 'module-animated-add-to-cart' ), | |
| 54 | - 'title' => esc_html__( 'Animated Add to Cart', 'merchant' ), | |
| 55 | - 'desc' => esc_html__( 'Make your Add To Cart button stand out by adding an animation on mouse over or page load', 'merchant' ), | |
| 56 | - 'tutorial_url' => 'https://docs.athemes.com/article/animated-add-to-cart/' | |
| 57 | - ), | |
| 58 | - 'quick-view' => array( | |
| 59 | - 'pro' => false, | |
| 60 | - 'section' => 'convert-more', | |
| 61 | - 'icon' => Merchant_SVG_Icons::get_svg_icon( 'module-quick-view' ), | |
| 62 | - 'title' => esc_html__( 'Quick View', 'merchant' ), | |
| 63 | - 'desc' => esc_html__( 'Allows users to quickly view product details without leaving the current page', 'merchant' ), | |
| 64 | - 'tutorial_url' => 'https://docs.athemes.com/article/quick-view/' | |
| 65 | - ), | |
| 66 | - 'product-labels' => array( | |
| 67 | - 'pro' => false, | |
| 68 | - 'section' => 'convert-more', | |
| 69 | - 'icon' => Merchant_SVG_Icons::get_svg_icon( 'module-product-labels' ), | |
| 70 | - 'title' => esc_html__( 'Product Labels', 'merchant' ), | |
| 71 | - 'desc' => esc_html__( 'Add customizable labels on top of your product images', 'merchant' ), | |
| 72 | - 'tutorial_url' => 'https://docs.athemes.com/article/product-labels/' | |
| 73 | - ), | |
| 74 | - 'add-to-cart-text' => array( | |
| 75 | - 'pro' => false, | |
| 76 | - 'section' => 'convert-more', | |
| 77 | - 'icon' => Merchant_SVG_Icons::get_svg_icon( 'module-add-to-cart-text' ), | |
| 78 | - 'title' => esc_html__( 'Add To Cart Text', 'merchant' ), | |
| 79 | - 'desc' => esc_html__( 'Change your store’s ‘Add to Cart’ text for simple, variable, out of stock and individual products', 'merchant' ), | |
| 80 | - 'tutorial_url' => 'https://docs.athemes.com/article/merchant-add-to-cart-text/' | |
| 81 | - ), | |
| 82 | - 'sticky-add-to-cart' => array( | |
| 83 | - 'pro' => true, | |
| 84 | - 'section' => 'convert-more', | |
| 85 | - 'icon' => Merchant_SVG_Icons::get_svg_icon( 'module-sticky-add-to-cart' ), | |
| 86 | - 'title' => esc_html__( 'Sticky Add To Cart', 'merchant' ), | |
| 87 | - 'desc' => esc_html__( 'Display a sticky add to cart bar when visitors are scrolling on your product pages', 'merchant' ), | |
| 88 | - 'tutorial_url' => 'https://docs.athemes.com/article/merchant-sticky-add-to-cart/' | |
| 89 | - ), | |
| 90 | - 'recently-viewed-products' => array( | |
| 91 | - 'pro' => true, | |
| 92 | - 'section' => 'convert-more', | |
| 93 | - 'icon' => Merchant_SVG_Icons::get_svg_icon( 'module-recently-viewed-products' ), | |
| 94 | - 'title' => esc_html__( 'Recently Viewed Products', 'merchant' ), | |
| 95 | - 'desc' => esc_html__( 'Show recently viewed products on product pages and in the cart', 'merchant' ), | |
| 96 | - 'tutorial_url' => 'https://docs.athemes.com/article/merchant-recently-viewed-products/' | |
| 97 | - ), | |
| 98 | - 'wait-list' => array( | |
| 99 | - 'pro' => true, | |
| 100 | - 'section' => 'convert-more', | |
| 101 | - 'icon' => Merchant_SVG_Icons::get_svg_icon( 'module-wait-list' ), | |
| 102 | - 'title' => esc_html__( 'Waitlist', 'merchant' ), | |
| 103 | - 'desc' => esc_html__( 'Build a waiting list for sold-out items and auto-notify potential customers when stock’s back', 'merchant' ), | |
| 104 | - 'tutorial_url' => 'https://docs.athemes.com/article/merchant-waitlist/' | |
| 105 | - ), | |
| 106 | - 'countdown-timer' => array( | |
| 107 | - 'pro' => true, | |
| 108 | - 'section' => 'convert-more', | |
| 109 | - 'icon' => Merchant_SVG_Icons::get_svg_icon( 'module-countdown-timer' ), | |
| 110 | - 'title' => esc_html__( 'Countdown Timer', 'merchant' ), | |
| 111 | - 'desc' => esc_html__( 'Create a sense of urgency by displaying a countdown timer on your discounted products', 'merchant' ), | |
| 112 | - 'tutorial_url' => 'https://docs.athemes.com/article/merchant-countdown-timer/' | |
| 113 | - ), | |
| 114 | - 'advanced-reviews' => array( | |
| 115 | - 'pro' => true, | |
| 116 | - 'section' => 'convert-more', | |
| 117 | - 'icon' => Merchant_SVG_Icons::get_svg_icon( 'module-advanced-reviews' ), | |
| 118 | - 'title' => esc_html__( 'Advanced Reviews', 'merchant' ), | |
| 119 | - 'desc' => esc_html__( 'Let customers run your marketing by collecting and displaying advanced reviews', 'merchant' ), | |
| 120 | - 'tutorial_url' => 'https://docs.athemes.com/article/merchant-advanced-reviews/' | |
| 121 | - ), | |
| 122 | - 'checkout' => array( | |
| 123 | - 'pro' => true, | |
| 124 | - 'section' => 'convert-more', | |
| 125 | - 'icon' => Merchant_SVG_Icons::get_svg_icon( 'module-checkout' ), | |
| 126 | - 'title' => esc_html__( 'Checkouts', 'merchant' ), | |
| 127 | - 'desc' => esc_html__( 'Choose from three different checkout layouts: Shopify-style, Multi-step or One-page', 'merchant' ), | |
| 128 | - 'tutorial_url' => 'https://docs.athemes.com/article/merchant-checkouts/' | |
| 129 | - ), | |
| 130 | - 'stock-scarcity' => array( | |
| 131 | - 'pro' => true, | |
| 132 | - 'section' => 'convert-more', | |
| 133 | - 'icon' => Merchant_SVG_Icons::get_svg_icon( 'module-stock-scarcity' ), | |
| 134 | - 'title' => esc_html__( 'Stock Scarcity', 'merchant' ), | |
| 135 | - 'desc' => esc_html__( 'Let visitors know that stock is running low on products they are looking at', 'merchant' ), | |
| 136 | - 'tutorial_url' => 'https://docs.athemes.com/article/merchant-stock-scarcity/' | |
| 137 | - ), | |
| 138 | - | |
| 139 | - // Boost Revenue. | |
| 140 | - 'pre-orders' => array( | |
| 141 | - 'pro' => false, | |
| 142 | - 'section' => 'boost-revenue', | |
| 143 | - 'icon' => Merchant_SVG_Icons::get_svg_icon( 'module-pre-orders' ), | |
| 144 | - 'title' => esc_html__( 'Pre-Orders', 'merchant' ), | |
| 145 | - 'desc' => esc_html__( 'Allow visitors to pre-order products that are either out of stock or not yet released', 'merchant' ), | |
| 146 | - 'tutorial_url' => 'https://docs.athemes.com/article/pre-orders/' | |
| 147 | - ), | |
| 148 | - 'frequently-bought-together' => array( | |
| 149 | - 'pro' => true, | |
| 150 | - 'section' => 'boost-revenue', | |
| 151 | - 'icon' => Merchant_SVG_Icons::get_svg_icon( 'module-frequently-bought-together' ), | |
| 152 | - 'title' => esc_html__( 'Frequently Bought Together', 'merchant' ), | |
| 153 | - 'desc' => esc_html__( 'Create discounted product bundles with items that are frequently purchased together', 'merchant' ), | |
| 154 | - 'tutorial_url' => 'https://docs.athemes.com/article/merchant-frequently-bought-together/' | |
| 155 | - ), | |
| 156 | - 'buy-x-get-y' => array( | |
| 157 | - 'pro' => true, | |
| 158 | - 'section' => 'boost-revenue', | |
| 159 | - 'icon' => Merchant_SVG_Icons::get_svg_icon( 'module-buy-x-get-y' ), | |
| 160 | - 'title' => esc_html__( 'Buy X, Get Y', 'merchant' ), | |
| 161 | - 'desc' => esc_html__( 'When product X is purchased, give a discount on product Y ', 'merchant' ), | |
| 162 | - 'tutorial_url' => 'https://docs.athemes.com/article/merchant-buy-x-get-y/' | |
| 163 | - ), | |
| 164 | - 'volume-discounts' => array( | |
| 165 | - 'pro' => true, | |
| 166 | - 'section' => 'boost-revenue', | |
| 167 | - 'icon' => Merchant_SVG_Icons::get_svg_icon( 'module-volume-discounts' ), | |
| 168 | - 'title' => esc_html__( 'Volume Discounts', 'merchant' ), | |
| 169 | - 'desc' => esc_html__( 'Offer discounts on larger quantity purchases to drive up average order value', 'merchant' ), | |
| 170 | - 'tutorial_url' => 'https://docs.athemes.com/article/merchant-volume-discounts/' | |
| 171 | - ), | |
| 172 | - 'spending-goal' => array( | |
| 173 | - 'pro' => true, | |
| 174 | - 'section' => 'boost-revenue', | |
| 175 | - 'icon' => Merchant_SVG_Icons::get_svg_icon( 'module-spending-goal' ), | |
| 176 | - 'title' => esc_html__( 'Spending Discount Goal', 'merchant' ), | |
| 177 | - 'desc' => esc_html__( 'Motivate higher order values by offering customers discounts for reaching spending goals', 'merchant' ), | |
| 178 | - 'tutorial_url' => 'https://docs.athemes.com/article/merchant-spending-goal/' | |
| 179 | - ), | |
| 180 | - 'free-gifts' => array( | |
| 181 | - 'pro' => true, | |
| 182 | - 'section' => 'boost-revenue', | |
| 183 | - 'icon' => Merchant_SVG_Icons::get_svg_icon( 'module-free-gifts' ), | |
| 184 | - 'title' => esc_html__( 'Free Gifts', 'merchant' ), | |
| 185 | - 'desc' => esc_html__( 'Reward shoppers with a gift if they hit a specified spending target', 'merchant' ), | |
| 186 | - 'tutorial_url' => 'https://docs.athemes.com/article/merchant-gift-card/' | |
| 187 | - ), | |
| 188 | - | |
| 189 | - // Reduce Abandonment. | |
| 190 | - 'cart-count-favicon' => array( | |
| 191 | - 'pro' => false, | |
| 192 | - 'section' => 'reduce-abandonment', | |
| 193 | - 'icon' => Merchant_SVG_Icons::get_svg_icon( 'module-cart-count-favicon' ), | |
| 194 | - 'title' => esc_html__( 'Cart Count Favicon', 'merchant' ), | |
| 195 | - 'desc' => esc_html__( 'Make your browser tab stand out by showing the number of items in the cart on the favicon', 'merchant' ), | |
| 196 | - 'tutorial_url' => 'https://docs.athemes.com/article/cart-count-favicon/' | |
| 197 | - ), | |
| 198 | - 'inactive-tab-message' => array( | |
| 199 | - 'pro' => false, | |
| 200 | - 'section' => 'reduce-abandonment', | |
| 201 | - 'icon' => Merchant_SVG_Icons::get_svg_icon( 'module-inactive-tab-message' ), | |
| 202 | - 'title' => esc_html__( 'Inactive Tab Message', 'merchant' ), | |
| 203 | - 'desc' => esc_html__( 'Modify the browser tab\'s title when the visitor navigates away from your store', 'merchant' ), | |
| 204 | - 'tutorial_url' => 'https://docs.athemes.com/article/merchant-inactive-tab-message/' | |
| 205 | - ), | |
| 206 | - 'floating-mini-cart' => array( | |
| 207 | - 'pro' => true, | |
| 208 | - 'section' => 'reduce-abandonment', | |
| 209 | - 'icon' => Merchant_SVG_Icons::get_svg_icon( 'module-floating-mini-cart' ), | |
| 210 | - 'title' => esc_html__( 'Floating Mini Cart', 'merchant' ), | |
| 211 | - 'desc' => esc_html__( 'A cart icon will always be visible and a sliding cart when the customer clicks it', 'merchant' ), | |
| 212 | - 'tutorial_url' => 'https://docs.athemes.com/article/merchant-side-cart/' | |
| 213 | - ), | |
| 214 | - 'side-cart' => array( | |
| 215 | - 'pro' => true, | |
| 216 | - 'section' => 'reduce-abandonment', | |
| 217 | - 'icon' => Merchant_SVG_Icons::get_svg_icon( 'module-side-cart' ), | |
| 218 | - 'title' => esc_html__( 'Side Cart', 'merchant' ), | |
| 219 | - 'desc' => esc_html__( 'Show a sliding cart whenever a customer adds a product to the cart', 'merchant' ), | |
| 220 | - 'tutorial_url' => 'https://docs.athemes.com/article/merchant-side-cart/' | |
| 221 | - ), | |
| 222 | - 'cart-reserved-timer' => array( | |
| 223 | - 'pro' => true, | |
| 224 | - 'section' => 'reduce-abandonment', | |
| 225 | - 'icon' => Merchant_SVG_Icons::get_svg_icon( 'module-cart-reserved-timer' ), | |
| 226 | - 'title' => esc_html__( 'Cart Reserved Timer', 'merchant' ), | |
| 227 | - 'desc' => esc_html__( 'Create urgency by letting visitors know that the products in cart are reserved for a limited time', 'merchant' ), | |
| 228 | - 'tutorial_url' => 'https://docs.athemes.com/article/merchant-cart-reserved-timer/' | |
| 229 | - ), | |
| 230 | - | |
| 231 | - // Build Trust. | |
| 232 | - 'payment-logos' => array( | |
| 233 | - 'pro' => false, | |
| 234 | - 'section' => 'build-trust', | |
| 235 | - 'icon' => Merchant_SVG_Icons::get_svg_icon( 'module-payment-logos' ), | |
| 236 | - 'title' => esc_html__( 'Payment Logos', 'merchant' ), | |
| 237 | - 'desc' => esc_html__( 'Display the logos of the payment methods you accept on product pages', 'merchant' ), | |
| 238 | - 'tutorial_url' => 'https://docs.athemes.com/article/payment-logos/' | |
| 239 | - ), | |
| 240 | - 'trust-badges' => array( | |
| 241 | - 'pro' => false, | |
| 242 | - 'section' => 'build-trust', | |
| 243 | - 'icon' => Merchant_SVG_Icons::get_svg_icon( 'module-trust-badges' ), | |
| 244 | - 'title' => esc_html__( 'Trust Badges', 'merchant' ), | |
| 245 | - 'desc' => esc_html__( 'Reassure customers by showcasing different badge-shaped store benefits', 'merchant' ), | |
| 246 | - 'tutorial_url' => 'https://docs.athemes.com/article/trust-badges/' | |
| 247 | - ), | |
| 248 | - 'reasons-to-buy' => array( | |
| 249 | - 'pro' => true, | |
| 250 | - 'section' => 'build-trust', | |
| 251 | - 'icon' => Merchant_SVG_Icons::get_svg_icon( 'module-reasons-to-buy' ), | |
| 252 | - 'title' => esc_html__( 'Reasons To Buy List', 'merchant' ), | |
| 253 | - 'desc' => esc_html__( 'Provide customers with a summary of the key features and benefits of your products', 'merchant' ), | |
| 254 | - 'tutorial_url' => 'https://docs.athemes.com/article/merchant-reasons-to-buy/' | |
| 255 | - ), | |
| 256 | - 'quick-social-links' => array( | |
| 257 | - 'pro' => true, | |
| 258 | - 'section' => 'build-trust', | |
| 259 | - 'icon' => Merchant_SVG_Icons::get_svg_icon( 'module-quick-social-links' ), | |
| 260 | - 'title' => esc_html__( 'Quick Social Links', 'merchant' ), | |
| 261 | - 'desc' => esc_html__( 'Display floating social media icons to make it easier for your customers to connect with you', 'merchant' ), | |
| 262 | - 'tutorial_url' => 'https://docs.athemes.com/article/merchant-quick-social-links/' | |
| 263 | - ), | |
| 264 | - 'product-brand-image' => array( | |
| 265 | - 'pro' => true, | |
| 266 | - 'section' => 'build-trust', | |
| 267 | - 'icon' => Merchant_SVG_Icons::get_svg_icon( 'module-product-brand-image' ), | |
| 268 | - 'title' => esc_html__( 'Product Brand Image', 'merchant' ), | |
| 269 | - 'desc' => esc_html__( 'Add brand images to products to instill confidence in potential buyers', 'merchant' ), | |
| 270 | - 'tutorial_url' => 'https://docs.athemes.com/article/merchant-product-brand-image/' | |
| 271 | - ), | |
| 272 | - | |
| 273 | - // Improve Experience. | |
| 274 | - 'auto-external-links' => array( | |
| 275 | - 'pro' => false, | |
| 276 | - 'section' => 'improve-experience', | |
| 277 | - 'icon' => Merchant_SVG_Icons::get_svg_icon( 'module-auto-external-links' ), | |
| 278 | - 'title' => esc_html__( 'Auto External Links', 'merchant' ), | |
| 279 | - 'desc' => esc_html__( 'Keep users from navigating away from your store by opening external links in a new browser tab', 'merchant' ), | |
| 280 | - 'tutorial_url' => 'https://docs.athemes.com/article/auto-external-links/' | |
| 281 | - ), | |
| 282 | - 'real-time-search' => array( | |
| 283 | - 'pro' => false, | |
| 284 | - 'section' => 'improve-experience', | |
| 285 | - 'icon' => Merchant_SVG_Icons::get_svg_icon( 'module-real-time-search' ), | |
| 286 | - 'title' => esc_html__( 'Real-Time Search', 'merchant' ), | |
| 287 | - 'desc' => esc_html__( 'Help visitors instantly find the products they\'re looking for by using predictive search', 'merchant' ), | |
| 288 | - 'tutorial_url' => 'https://docs.athemes.com/article/real-time-search/' | |
| 289 | - ), | |
| 290 | - 'code-snippets' => array( | |
| 291 | - 'pro' => false, | |
| 292 | - 'section' => 'improve-experience', | |
| 293 | - 'icon' => Merchant_SVG_Icons::get_svg_icon( 'module-code-snippets' ), | |
| 294 | - 'title' => esc_html__( 'Code Snippets', 'merchant' ), | |
| 295 | - 'desc' => esc_html__( 'Add code snippets in WordPress without having to edit your theme\'s functions.php file ', 'merchant' ), | |
| 296 | - 'tutorial_url' => 'https://docs.athemes.com/article/code-snippets/' | |
| 297 | - ), | |
| 298 | - 'scroll-to-top-button' => array( | |
| 299 | - 'pro' => false, | |
| 300 | - 'section' => 'improve-experience', | |
| 301 | - 'icon' => Merchant_SVG_Icons::get_svg_icon( 'module-scroll-to-top-button' ), | |
| 302 | - 'title' => esc_html__( 'Scroll to Top Button', 'merchant' ), | |
| 303 | - 'desc' => esc_html__( 'Help your customers get back easily to the top of the page with a single click', 'merchant' ), | |
| 304 | - 'tutorial_url' => 'https://docs.athemes.com/article/scroll-to-top-button/' | |
| 305 | - ), | |
| 306 | - 'size-chart' => array( | |
| 307 | - 'pro' => true, | |
| 308 | - 'section' => 'improve-experience', | |
| 309 | - 'icon' => Merchant_SVG_Icons::get_svg_icon( 'module-size-chart' ), | |
| 310 | - 'title' => esc_html__( 'Size Chart', 'merchant' ), | |
| 311 | - 'desc' => esc_html__( 'Reduce returns and increase sales by showing a size chart on specific products or all products', 'merchant' ), | |
| 312 | - 'tutorial_url' => 'https://docs.athemes.com/article/merchant-size-chart/' | |
| 313 | - ), | |
| 314 | - 'wishlist' => array( | |
| 315 | - 'pro' => true, | |
| 316 | - 'section' => 'improve-experience', | |
| 317 | - 'icon' => Merchant_SVG_Icons::get_svg_icon( 'module-wishlist' ), | |
| 318 | - 'title' => esc_html__( 'Wishlist', 'merchant' ), | |
| 319 | - 'desc' => esc_html__( 'Allow customers to easily save products they are interested in for later', 'merchant' ), | |
| 320 | - 'tutorial_url' => 'https://docs.athemes.com/article/merchant-wishlist/' | |
| 321 | - ), | |
| 322 | - 'product-video' => array( | |
| 323 | - 'pro' => true, | |
| 324 | - 'section' => 'improve-experience', | |
| 325 | - 'icon' => Merchant_SVG_Icons::get_svg_icon( 'module-product-video' ), | |
| 326 | - 'title' => esc_html__( 'Product Video', 'merchant' ), | |
| 327 | - 'desc' => esc_html__( 'Upload video to be viewed in product galleries and on archive pages', 'merchant' ), | |
| 328 | - 'tutorial_url' => 'https://docs.athemes.com/article/merchant-product-video/' | |
| 329 | - ), | |
| 330 | - 'product-audio' => array( | |
| 331 | - 'pro' => true, | |
| 332 | - 'section' => 'improve-experience', | |
| 333 | - 'icon' => Merchant_SVG_Icons::get_svg_icon( 'module-product-audio' ), | |
| 334 | - 'title' => esc_html__( 'Product Audio', 'merchant' ), | |
| 335 | - 'desc' => esc_html__( 'Upload audio to be listened to in product galleries and on archive pages', 'merchant' ), | |
| 336 | - 'tutorial_url' => 'https://docs.athemes.com/article/merchant-product-audio/' | |
| 337 | - ), | |
| 338 | - 'login-popup' => array( | |
| 339 | - 'pro' => true, | |
| 340 | - 'section' => 'improve-experience', | |
| 341 | - 'icon' => Merchant_SVG_Icons::get_svg_icon( 'module-login-popup' ), | |
| 342 | - 'title' => esc_html__( 'Login Popup', 'merchant' ), | |
| 343 | - 'desc' => esc_html__( 'Allow users to log in with a simple pop up without navigating to a new page', 'merchant' ), | |
| 344 | - 'tutorial_url' => 'https://docs.athemes.com/article/merchant-login-popup/' | |
| 345 | - ), | |
| 346 | - 'product-swatches' => array( | |
| 347 | - 'pro' => true, | |
| 348 | - 'section' => 'improve-experience', | |
| 349 | - 'icon' => Merchant_SVG_Icons::get_svg_icon( 'module-product-swatches' ), | |
| 350 | - 'title' => esc_html__( 'Variation Swatches', 'merchant' ), | |
| 351 | - 'desc' => esc_html__( 'Swatches make it easy for customers to view your product variants at a glance', 'merchant' ), | |
| 352 | - 'tutorial_url' => 'https://docs.athemes.com/article/merchant-variation-swatches/' | |
| 353 | - ), | |
| 354 | - 'product-navigation-links' => array( | |
| 355 | - 'pro' => true, | |
| 356 | - 'section' => 'improve-experience', | |
| 357 | - 'icon' => Merchant_SVG_Icons::get_svg_icon( 'module-product-navigation-links' ), | |
| 358 | - 'title' => esc_html__( 'Product Navigation Links', 'merchant' ), | |
| 359 | - 'desc' => esc_html__( 'Enable easy navigation from one product to the next with next/previous links', 'merchant' ), | |
| 360 | - 'tutorial_url' => 'https://docs.athemes.com/article/merchant-product-navigation-links/' | |
| 361 | - ), | |
| 362 | - | |
| 363 | - // Protect Store. | |
| 364 | - 'agree-to-terms-checkbox' => array( | |
| 365 | - 'pro' => false, | |
| 366 | - 'section' => 'protect-your-store', | |
| 367 | - 'icon' => Merchant_SVG_Icons::get_svg_icon( 'module-agree-to-terms-checkbox' ), | |
| 368 | - 'title' => esc_html__( 'Agree to Terms Checkbox', 'merchant' ), | |
| 369 | - 'desc' => esc_html__( 'Get customers to agree to your Terms & Conditions as part of the checkout process', 'merchant' ), | |
| 370 | - 'tutorial_url' => 'https://docs.athemes.com/article/agree-to-terms-checkbox/' | |
| 371 | - ), | |
| 372 | - 'cookie-banner' => array( | |
| 373 | - 'pro' => false, | |
| 374 | - 'section' => 'protect-your-store', | |
| 375 | - 'icon' => Merchant_SVG_Icons::get_svg_icon( 'module-cookie-banner' ), | |
| 376 | - 'title' => esc_html__( 'Cookie Banner', 'merchant' ), | |
| 377 | - 'desc' => esc_html__( 'Inform your visitors that the site uses cookies via a dismissable banner', 'merchant' ), | |
| 378 | - 'tutorial_url' => 'https://docs.athemes.com/article/cookie-banner/' | |
| 379 | - ) | |
| 380 | - | |
| 381 | - ); | |
| 382 | - | |
| 383 | - } | |
| 384 | - | |
| 385 | - /** | |
| 386 | - * Get modules. | |
| 387 | - */ | |
| 388 | - public static function get_modules() { | |
| 389 | - | |
| 390 | - $modules = array( | |
| 391 | - | |
| 392 | - 'convert-more' => array( | |
| 393 | - 'title' => esc_html__( 'Convert More', 'merchant' ), | |
| 394 | - 'modules' => array() | |
| 395 | - ), | |
| 396 | - | |
| 397 | - 'boost-revenue' => array( | |
| 398 | - 'title' => esc_html__( 'Boost Revenue', 'merchant' ), | |
| 399 | - 'modules' => array(), | |
| 400 | - ), | |
| 401 | - | |
| 402 | - 'reduce-abandonment' => array( | |
| 403 | - 'title' => esc_html__( 'Reduce Cart Abandonment', 'merchant' ), | |
| 404 | - 'modules' => array(), | |
| 405 | - ), | |
| 406 | - | |
| 407 | - 'build-trust' => array( | |
| 408 | - 'title' => esc_html__( 'Build Trust', 'merchant' ), | |
| 409 | - 'modules' => array(), | |
| 410 | - ), | |
| 411 | - | |
| 412 | - 'improve-experience' => array( | |
| 413 | - 'title' => esc_html__( 'Improve Experience', 'merchant' ), | |
| 414 | - 'modules' => array(), | |
| 415 | - ), | |
| 416 | - | |
| 417 | - 'protect-your-store' => array( | |
| 418 | - 'title' => esc_html__( 'Protect Store', 'merchant' ), | |
| 419 | - 'modules' => array() | |
| 420 | - ), | |
| 421 | - | |
| 422 | - ); | |
| 423 | - | |
| 424 | - /** | |
| 425 | - * Hook: merchant_modules | |
| 426 | - * | |
| 427 | - * @since 1.0 | |
| 428 | - */ | |
| 429 | - $modules = apply_filters( 'merchant_modules', $modules ); | |
| 430 | - | |
| 431 | - return $modules; | |
| 432 | - | |
| 433 | - } | |
| 434 | - | |
| 435 | - /** | |
| 436 | - * Get upsell modules. | |
| 437 | - * | |
| 438 | - */ | |
| 439 | - public static function get_upsell_modules() { | |
| 440 | - return array_filter( self::$modules_data, function( $module ){ | |
| 441 | - return isset( $module[ 'pro' ] ) && $module[ 'pro' ] ? $module : false; | |
| 442 | - } ); | |
| 443 | - } | |
| 444 | - | |
| 445 | - /** | |
| 446 | - * Add upsell to modules. | |
| 447 | - * | |
| 448 | - */ | |
| 449 | - public static function add_upsell_modules( $modules ) { | |
| 450 | - if ( defined( 'MERCHANT_PRO_VERSION' ) ) { | |
| 451 | - return $modules; | |
| 452 | - } | |
| 453 | - | |
| 454 | - foreach ( self::get_upsell_modules() as $module_id => $module_data ) { | |
| 455 | - $modules[ $module_data[ 'section' ] ][ 'modules' ][ $module_id ] = $module_data; | |
| 456 | - } | |
| 457 | - | |
| 458 | - return $modules; | |
| 459 | - } | |
| 460 | - | |
| 461 | - /** | |
| 462 | - * Get module info. | |
| 463 | - */ | |
| 464 | - public static function get_module_info( $module ) { | |
| 465 | - | |
| 466 | - $modules = self::get_modules(); | |
| 467 | - | |
| 468 | - $maybe_found = array_column( array_column( $modules, 'modules' ), $module ); | |
| 469 | - | |
| 470 | - if ( ! empty( $maybe_found ) && ! empty( $maybe_found[0] ) ) { | |
| 471 | - return $maybe_found[0]; | |
| 472 | - } | |
| 473 | - | |
| 474 | - return false; | |
| 475 | - | |
| 476 | - } | |
| 477 | - | |
| 478 | - } | |
| 479 | - | |
| 480 | - Merchant_Admin_Modules::instance(); | |
| 481 | - | |
| 482 | -} | |
| 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 | + class Merchant_Admin_Modules { | |
| 12 | + | |
| 13 | + /** | |
| 14 | + * Upsell modules. | |
| 15 | + */ | |
| 16 | + public static $modules_data = array(); | |
| 17 | + | |
| 18 | + /** | |
| 19 | + * The single class instance. | |
| 20 | + */ | |
| 21 | + private static $instance = null; | |
| 22 | + | |
| 23 | + /** | |
| 24 | + * Instance. | |
| 25 | + */ | |
| 26 | + public static function instance() { | |
| 27 | + if ( is_null( self::$instance ) ) { | |
| 28 | + self::$instance = new self(); | |
| 29 | + } | |
| 30 | + return self::$instance; | |
| 31 | + } | |
| 32 | + | |
| 33 | + /** | |
| 34 | + * Constructor. | |
| 35 | + */ | |
| 36 | + public function __construct() { | |
| 37 | + self::$modules_data = array( | |
| 38 | + 'pre-orders' => array( | |
| 39 | + 'pro' => false, | |
| 40 | + 'section' => 'boost-revenue', | |
| 41 | + 'icon' => Merchant_SVG_Icons::get_svg_icon( 'module-pre-orders' ), | |
| 42 | + ), | |
| 43 | + 'wait-list' => array( | |
| 44 | + 'pro' => true, | |
| 45 | + 'section' => 'boost-revenue', | |
| 46 | + 'icon' => Merchant_SVG_Icons::get_svg_icon( 'module-wait-list' ), | |
| 47 | + ), | |
| 48 | + 'product-bundles' => array( | |
| 49 | + 'pro' => true, | |
| 50 | + 'section' => 'boost-revenue', | |
| 51 | + 'icon' => Merchant_SVG_Icons::get_svg_icon( 'module-product-bundles' ), | |
| 52 | + ), | |
| 53 | + 'frequently-bought-together' => array( | |
| 54 | + 'pro' => true, | |
| 55 | + 'section' => 'boost-revenue', | |
| 56 | + 'icon' => Merchant_SVG_Icons::get_svg_icon( 'module-frequently-bought-together' ), | |
| 57 | + ), | |
| 58 | + 'buy-x-get-y' => array( | |
| 59 | + 'pro' => true, | |
| 60 | + 'section' => 'boost-revenue', | |
| 61 | + 'icon' => Merchant_SVG_Icons::get_svg_icon( 'module-buy-x-get-y' ), | |
| 62 | + ), | |
| 63 | + 'complementary-products' => array( | |
| 64 | + 'pro' => true, | |
| 65 | + 'section' => 'boost-revenue', | |
| 66 | + 'icon' => Merchant_SVG_Icons::get_svg_icon( 'complementary-products' ), | |
| 67 | + ), | |
| 68 | + 'volume-discounts' => array( | |
| 69 | + 'pro' => true, | |
| 70 | + 'section' => 'boost-revenue', | |
| 71 | + 'icon' => Merchant_SVG_Icons::get_svg_icon( 'module-volume-discounts' ), | |
| 72 | + ), | |
| 73 | + 'storewide-sale' => array( | |
| 74 | + 'pro' => true, | |
| 75 | + 'section' => 'boost-revenue', | |
| 76 | + 'icon' => Merchant_SVG_Icons::get_svg_icon( 'module-storewide-sale' ), | |
| 77 | + ), | |
| 78 | + 'spending-goal' => array( | |
| 79 | + 'pro' => true, | |
| 80 | + 'section' => 'boost-revenue', | |
| 81 | + 'icon' => Merchant_SVG_Icons::get_svg_icon( 'module-spending-goal' ), | |
| 82 | + ), | |
| 83 | + 'free-gifts' => array( | |
| 84 | + 'pro' => true, | |
| 85 | + 'section' => 'boost-revenue', | |
| 86 | + 'icon' => Merchant_SVG_Icons::get_svg_icon( 'module-free-gifts' ), | |
| 87 | + ), | |
| 88 | + 'free-shipping-progress-bar' => array( | |
| 89 | + 'pro' => true, | |
| 90 | + 'section' => 'boost-revenue', | |
| 91 | + 'icon' => Merchant_SVG_Icons::get_svg_icon( 'free-shipping-progress-bar' ), | |
| 92 | + ), | |
| 93 | + 'product-labels' => array( | |
| 94 | + 'pro' => false, | |
| 95 | + 'section' => 'convert-more', | |
| 96 | + 'icon' => Merchant_SVG_Icons::get_svg_icon( 'module-product-labels' ), | |
| 97 | + ), | |
| 98 | + 'quick-view' => array( | |
| 99 | + 'pro' => false, | |
| 100 | + 'section' => 'convert-more', | |
| 101 | + 'icon' => Merchant_SVG_Icons::get_svg_icon( 'module-quick-view' ), | |
| 102 | + ), | |
| 103 | + 'added-to-cart-popup' => array( | |
| 104 | + 'pro' => true, | |
| 105 | + 'section' => 'convert-more', | |
| 106 | + 'icon' => Merchant_SVG_Icons::get_svg_icon( 'added-to-cart-popup' ), | |
| 107 | + ), | |
| 108 | + 'countdown-timer' => array( | |
| 109 | + 'pro' => true, | |
| 110 | + 'section' => 'convert-more', | |
| 111 | + 'icon' => Merchant_SVG_Icons::get_svg_icon( 'module-countdown-timer' ), | |
| 112 | + ), | |
| 113 | + 'stock-scarcity' => array( | |
| 114 | + 'pro' => true, | |
| 115 | + 'section' => 'convert-more', | |
| 116 | + 'icon' => Merchant_SVG_Icons::get_svg_icon( 'module-stock-scarcity' ), | |
| 117 | + ), | |
| 118 | + 'checkout' => array( | |
| 119 | + 'pro' => true, | |
| 120 | + 'section' => 'convert-more', | |
| 121 | + 'icon' => Merchant_SVG_Icons::get_svg_icon( 'module-checkout' ), | |
| 122 | + ), | |
| 123 | + 'delivery-pickup' => array( | |
| 124 | + 'pro' => true, | |
| 125 | + 'section' => 'convert-more', | |
| 126 | + 'icon' => Merchant_SVG_Icons::get_svg_icon( 'module-delivery-pickup' ), | |
| 127 | + ), | |
| 128 | + 'sticky-add-to-cart' => array( | |
| 129 | + 'pro' => true, | |
| 130 | + 'section' => 'convert-more', | |
| 131 | + 'icon' => Merchant_SVG_Icons::get_svg_icon( 'module-sticky-add-to-cart' ), | |
| 132 | + ), | |
| 133 | + 'recently-viewed-products' => array( | |
| 134 | + 'pro' => true, | |
| 135 | + 'section' => 'convert-more', | |
| 136 | + 'icon' => Merchant_SVG_Icons::get_svg_icon( 'module-recently-viewed-products' ), | |
| 137 | + ), | |
| 138 | + 'buy-now' => array( | |
| 139 | + 'pro' => false, | |
| 140 | + 'section' => 'reduce-abandonment', | |
| 141 | + 'icon' => Merchant_SVG_Icons::get_svg_icon( 'module-buy-now' ), | |
| 142 | + ), | |
| 143 | + 'cart-count-favicon' => array( | |
| 144 | + 'pro' => false, | |
| 145 | + 'section' => 'reduce-abandonment', | |
| 146 | + 'icon' => Merchant_SVG_Icons::get_svg_icon( 'module-cart-count-favicon' ), | |
| 147 | + ), | |
| 148 | + 'inactive-tab-message' => array( | |
| 149 | + 'pro' => false, | |
| 150 | + 'section' => 'reduce-abandonment', | |
| 151 | + 'icon' => Merchant_SVG_Icons::get_svg_icon( 'module-inactive-tab-message' ), | |
| 152 | + ), | |
| 153 | + 'cart-reserved-timer' => array( | |
| 154 | + 'pro' => true, | |
| 155 | + 'section' => 'reduce-abandonment', | |
| 156 | + 'icon' => Merchant_SVG_Icons::get_svg_icon( 'module-cart-reserved-timer' ), | |
| 157 | + ), | |
| 158 | + 'side-cart' => array( | |
| 159 | + 'pro' => true, | |
| 160 | + 'section' => 'reduce-abandonment', | |
| 161 | + 'icon' => Merchant_SVG_Icons::get_svg_icon( 'module-side-cart' ), | |
| 162 | + ), | |
| 163 | + 'payment-logos' => array( | |
| 164 | + 'pro' => false, | |
| 165 | + 'section' => 'build-trust', | |
| 166 | + 'icon' => Merchant_SVG_Icons::get_svg_icon( 'module-payment-logos' ), | |
| 167 | + ), | |
| 168 | + 'trust-badges' => array( | |
| 169 | + 'pro' => false, | |
| 170 | + 'section' => 'build-trust', | |
| 171 | + 'icon' => Merchant_SVG_Icons::get_svg_icon( 'module-trust-badges' ), | |
| 172 | + ), | |
| 173 | + 'advanced-reviews' => array( | |
| 174 | + 'pro' => true, | |
| 175 | + 'section' => 'build-trust', | |
| 176 | + 'icon' => Merchant_SVG_Icons::get_svg_icon( 'module-advanced-reviews' ), | |
| 177 | + ), | |
| 178 | + 'recent-sales-notifications' => array( | |
| 179 | + 'pro' => true, | |
| 180 | + 'section' => 'build-trust', | |
| 181 | + 'icon' => Merchant_SVG_Icons::get_svg_icon( 'recent-sales-notifications' ), | |
| 182 | + ), | |
| 183 | + 'reasons-to-buy' => array( | |
| 184 | + 'pro' => true, | |
| 185 | + 'section' => 'build-trust', | |
| 186 | + 'icon' => Merchant_SVG_Icons::get_svg_icon( 'module-reasons-to-buy' ), | |
| 187 | + ), | |
| 188 | + 'quick-social-links' => array( | |
| 189 | + 'pro' => true, | |
| 190 | + 'section' => 'build-trust', | |
| 191 | + 'icon' => Merchant_SVG_Icons::get_svg_icon( 'module-quick-social-links' ), | |
| 192 | + ), | |
| 193 | + 'product-brand-image' => array( | |
| 194 | + 'pro' => true, | |
| 195 | + 'section' => 'build-trust', | |
| 196 | + 'icon' => Merchant_SVG_Icons::get_svg_icon( 'module-product-brand-image' ), | |
| 197 | + ), | |
| 198 | + 'animated-add-to-cart' => array( | |
| 199 | + 'pro' => false, | |
| 200 | + 'section' => 'improve-experience', | |
| 201 | + 'icon' => Merchant_SVG_Icons::get_svg_icon( 'module-animated-add-to-cart' ), | |
| 202 | + ), | |
| 203 | + 'add-to-cart-text' => array( | |
| 204 | + 'pro' => false, | |
| 205 | + 'section' => 'improve-experience', | |
| 206 | + 'icon' => Merchant_SVG_Icons::get_svg_icon( 'module-add-to-cart-text' ), | |
| 207 | + ), | |
| 208 | + 'auto-external-links' => array( | |
| 209 | + 'pro' => false, | |
| 210 | + 'section' => 'improve-experience', | |
| 211 | + 'icon' => Merchant_SVG_Icons::get_svg_icon( 'module-auto-external-links' ), | |
| 212 | + ), | |
| 213 | + 'real-time-search' => array( | |
| 214 | + 'pro' => false, | |
| 215 | + 'section' => 'improve-experience', | |
| 216 | + 'icon' => Merchant_SVG_Icons::get_svg_icon( 'module-real-time-search' ), | |
| 217 | + ), | |
| 218 | + 'scroll-to-top-button' => array( | |
| 219 | + 'pro' => false, | |
| 220 | + 'section' => 'improve-experience', | |
| 221 | + 'icon' => Merchant_SVG_Icons::get_svg_icon( 'module-scroll-to-top-button' ), | |
| 222 | + ), | |
| 223 | + 'address-autocomplete' => array( | |
| 224 | + 'pro' => true, | |
| 225 | + 'section' => 'improve-experience', | |
| 226 | + 'icon' => Merchant_SVG_Icons::get_svg_icon( 'google-autocomplete' ), | |
| 227 | + ), | |
| 228 | + 'size-chart' => array( | |
| 229 | + 'pro' => true, | |
| 230 | + 'section' => 'improve-experience', | |
| 231 | + 'icon' => Merchant_SVG_Icons::get_svg_icon( 'module-size-chart' ), | |
| 232 | + ), | |
| 233 | + 'product-swatches' => array( | |
| 234 | + 'pro' => true, | |
| 235 | + 'section' => 'improve-experience', | |
| 236 | + 'icon' => Merchant_SVG_Icons::get_svg_icon( 'module-product-swatches' ), | |
| 237 | + ), | |
| 238 | + 'wishlist' => array( | |
| 239 | + 'pro' => true, | |
| 240 | + 'section' => 'improve-experience', | |
| 241 | + 'icon' => Merchant_SVG_Icons::get_svg_icon( 'module-wishlist' ), | |
| 242 | + ), | |
| 243 | + 'product-navigation-links' => array( | |
| 244 | + 'pro' => true, | |
| 245 | + 'section' => 'improve-experience', | |
| 246 | + 'icon' => Merchant_SVG_Icons::get_svg_icon( 'module-product-navigation-links' ), | |
| 247 | + ), | |
| 248 | + 'product-video' => array( | |
| 249 | + 'pro' => true, | |
| 250 | + 'section' => 'improve-experience', | |
| 251 | + 'icon' => Merchant_SVG_Icons::get_svg_icon( 'module-product-video' ), | |
| 252 | + ), | |
| 253 | + 'product-audio' => array( | |
| 254 | + 'pro' => true, | |
| 255 | + 'section' => 'improve-experience', | |
| 256 | + 'icon' => Merchant_SVG_Icons::get_svg_icon( 'module-product-audio' ), | |
| 257 | + ), | |
| 258 | + 'login-popup' => array( | |
| 259 | + 'pro' => true, | |
| 260 | + 'section' => 'improve-experience', | |
| 261 | + 'icon' => Merchant_SVG_Icons::get_svg_icon( 'module-login-popup' ), | |
| 262 | + ), | |
| 263 | + 'clear-cart' => array( | |
| 264 | + 'pro' => false, | |
| 265 | + 'section' => 'improve-experience', | |
| 266 | + 'icon' => Merchant_SVG_Icons::get_svg_icon( 'module-clear-cart' ), | |
| 267 | + ), | |
| 268 | + 'agree-to-terms-checkbox' => array( | |
| 269 | + 'pro' => false, | |
| 270 | + 'section' => 'protect-your-store', | |
| 271 | + 'icon' => Merchant_SVG_Icons::get_svg_icon( 'module-agree-to-terms-checkbox' ), | |
| 272 | + ), | |
| 273 | + 'cookie-banner' => array( | |
| 274 | + 'pro' => false, | |
| 275 | + 'section' => 'protect-your-store', | |
| 276 | + 'icon' => Merchant_SVG_Icons::get_svg_icon( 'module-cookie-banner' ), | |
| 277 | + ), | |
| 278 | + ); | |
| 279 | + } | |
| 280 | + | |
| 281 | + /** | |
| 282 | + * Get modules. | |
| 283 | + */ | |
| 284 | + public static function get_modules() { | |
| 285 | + | |
| 286 | + $modules = array( | |
| 287 | + | |
| 288 | + 'boost-revenue' => array( | |
| 289 | + 'title' => esc_html__( 'Boost Revenue', 'merchant' ), | |
| 290 | + 'modules' => array(), | |
| 291 | + ), | |
| 292 | + | |
| 293 | + 'convert-more' => array( | |
| 294 | + 'title' => esc_html__( 'Convert More', 'merchant' ), | |
| 295 | + 'modules' => array(), | |
| 296 | + ), | |
| 297 | + | |
| 298 | + 'reduce-abandonment' => array( | |
| 299 | + 'title' => esc_html__( 'Reduce Cart Abandonment', 'merchant' ), | |
| 300 | + 'modules' => array(), | |
| 301 | + ), | |
| 302 | + | |
| 303 | + 'build-trust' => array( | |
| 304 | + 'title' => esc_html__( 'Build Trust', 'merchant' ), | |
| 305 | + 'modules' => array(), | |
| 306 | + ), | |
| 307 | + | |
| 308 | + 'improve-experience' => array( | |
| 309 | + 'title' => esc_html__( 'Improve Experience', 'merchant' ), | |
| 310 | + 'modules' => array(), | |
| 311 | + ), | |
| 312 | + | |
| 313 | + 'protect-your-store' => array( | |
| 314 | + 'title' => esc_html__( 'Protect Store', 'merchant' ), | |
| 315 | + 'modules' => array(), | |
| 316 | + ), | |
| 317 | + | |
| 318 | + ); | |
| 319 | + | |
| 320 | + /** | |
| 321 | + * Hook: merchant_modules | |
| 322 | + * | |
| 323 | + * @since 1.0 | |
| 324 | + */ | |
| 325 | + $modules = apply_filters( 'merchant_modules', $modules, self::modules_translation_data() ); | |
| 326 | + | |
| 327 | + // Populate modules with data and translations | |
| 328 | + foreach ( self::$modules_data as $module_id => $module_data ) { | |
| 329 | + if ( isset( self::modules_translation_data()[ $module_id ] ) ) { | |
| 330 | + $modules[ $module_data['section'] ]['modules'][ $module_id ] = array_merge( | |
| 331 | + $module_data, | |
| 332 | + array( | |
| 333 | + 'title' => self::modules_translation_data()[ $module_id ]['title'], | |
| 334 | + 'desc' => self::modules_translation_data()[ $module_id ]['desc'], | |
| 335 | + 'tutorial_url' => self::modules_translation_data()[ $module_id ]['tutorial_url'], | |
| 336 | + 'ai_examples' => self::get_module_ai_examples( $module_id ), | |
| 337 | + ) | |
| 338 | + ); | |
| 339 | + } | |
| 340 | + } | |
| 341 | + | |
| 342 | + return $modules; | |
| 343 | + } | |
| 344 | + | |
| 345 | + /** | |
| 346 | + * Get a module's AI prompt examples. | |
| 347 | + * | |
| 348 | + * Prefers the module's own class (see Merchant_Add_Module::get_ai_examples()) | |
| 349 | + * and falls back to modules_translation_data() for modules that don't yet | |
| 350 | + * define their own. | |
| 351 | + * | |
| 352 | + * @param string $module_id The module identifier. | |
| 353 | + * | |
| 354 | + * @return array Array with 'blurb' and 'prompts' keys, or an empty array. | |
| 355 | + */ | |
| 356 | + private static function get_module_ai_examples( $module ) { | |
| 357 | + $module_instance = Merchant_Modules::get_module( $module ); | |
| 358 | + | |
| 359 | + if ( $module_instance && ! empty( $module_instance->get_ai_examples() ) ) { | |
| 360 | + return $module_instance->get_ai_examples(); | |
| 361 | + } | |
| 362 | + | |
| 363 | + return self::modules_translation_data()[ $module ]['ai_examples'] ?? array(); | |
| 364 | + } | |
| 365 | + | |
| 366 | + /** | |
| 367 | + * Get upsell modules. | |
| 368 | + */ | |
| 369 | + public static function get_upsell_modules() { | |
| 370 | + $upsell_modules = array_filter( self::$modules_data, static function ( $module ) { | |
| 371 | + return isset( $module['pro'] ) && $module['pro'] ? $module : false; | |
| 372 | + } ); | |
| 373 | + | |
| 374 | + // Add translations to upsell modules | |
| 375 | + foreach ( $upsell_modules as $module_id => $module_data ) { | |
| 376 | + if ( isset( self::modules_translation_data()[ $module_id ] ) ) { | |
| 377 | + $upsell_modules[ $module_id ] = array_merge( | |
| 378 | + $module_data, | |
| 379 | + array( | |
| 380 | + 'title' => self::modules_translation_data()[ $module_id ]['title'], | |
| 381 | + 'desc' => self::modules_translation_data()[ $module_id ]['desc'], | |
| 382 | + 'tutorial_url' => self::modules_translation_data()[ $module_id ]['tutorial_url'], | |
| 383 | + ) | |
| 384 | + ); | |
| 385 | + } | |
| 386 | + } | |
| 387 | + | |
| 388 | + return $upsell_modules; | |
| 389 | + } | |
| 390 | + | |
| 391 | + /** | |
| 392 | + * Add upsell to modules. | |
| 393 | + */ | |
| 394 | + public static function add_upsell_modules( $modules ) { | |
| 395 | + if ( defined( 'MERCHANT_PRO_VERSION' ) ) { | |
| 396 | + return $modules; | |
| 397 | + } | |
| 398 | + | |
| 399 | + foreach ( self::get_upsell_modules() as $module_id => $module_data ) { | |
| 400 | + $modules[ $module_data['section'] ]['modules'][ $module_id ] = $module_data; | |
| 401 | + } | |
| 402 | + | |
| 403 | + return $modules; | |
| 404 | + } | |
| 405 | + | |
| 406 | + /** | |
| 407 | + * Get module info. | |
| 408 | + */ | |
| 409 | + public static function get_module_info( $module ) { | |
| 410 | + // Check if module exists in modules_data | |
| 411 | + if ( isset( self::$modules_data[ $module ] ) && isset( self::modules_translation_data()[ $module ] ) ) { | |
| 412 | + return array_merge( | |
| 413 | + self::$modules_data[ $module ], | |
| 414 | + array( | |
| 415 | + 'title' => self::modules_translation_data()[ $module ]['title'], | |
| 416 | + 'desc' => self::modules_translation_data()[ $module ]['desc'], | |
| 417 | + 'tutorial_url' => self::modules_translation_data()[ $module ]['tutorial_url'], | |
| 418 | + 'ai_examples' => self::get_module_ai_examples( $module ), | |
| 419 | + ) | |
| 420 | + ); | |
| 421 | + } | |
| 422 | + | |
| 423 | + // Fallback to checking get_modules | |
| 424 | + $modules = self::get_modules(); | |
| 425 | + $maybe_found = array_column( array_column( $modules, 'modules' ), $module ); | |
| 426 | + | |
| 427 | + if ( ! empty( $maybe_found ) && ! empty( $maybe_found[0] ) ) { | |
| 428 | + return $maybe_found[0]; | |
| 429 | + } | |
| 430 | + | |
| 431 | + return false; | |
| 432 | + } | |
| 433 | + | |
| 434 | + /** | |
| 435 | + * Supply modules translatable title and descriptions to modules data. | |
| 436 | + * | |
| 437 | + * @return array Array of modules data. | |
| 438 | + */ | |
| 439 | + private static function modules_translation_data() { | |
| 440 | + /** | |
| 441 | + * Hook: merchant_modules_translation_data | |
| 442 | + * Allow translating module data later when needed. | |
| 443 | + * | |
| 444 | + * @param array $modules_data Array of modules data. | |
| 445 | + * | |
| 446 | + * @since 2.1.0 | |
| 447 | + */ | |
| 448 | + return apply_filters( 'merchant_modules_translation_data', array( | |
| 449 | + 'pre-orders' => array( | |
| 450 | + 'title' => esc_html__( 'Pre-Orders', 'merchant' ), | |
| 451 | + 'desc' => esc_html__( 'Allow visitors to pre-order products that are either out of stock or not yet released', 'merchant' ), | |
| 452 | + 'tutorial_url' => 'https://docs.athemes.com/article/pre-orders/', | |
| 453 | + ), | |
| 454 | + 'wait-list' => array( | |
| 455 | + 'title' => esc_html__( 'Waitlist', 'merchant' ), | |
| 456 | + 'desc' => esc_html__( 'Build waitlists for sold-out items and auto-notify potential customers when items are restocked', 'merchant' ), | |
| 457 | + 'tutorial_url' => 'https://docs.athemes.com/article/merchant-waitlist/', | |
| 458 | + ), | |
| 459 | + 'product-bundles' => array( | |
| 460 | + 'title' => esc_html__( 'Product Bundles', 'merchant' ), | |
| 461 | + 'desc' => esc_html__( 'Create bundles of products to be sold together and boost your average order value', 'merchant' ), | |
| 462 | + 'tutorial_url' => 'https://docs.athemes.com/article/merchant-product-bundles/', | |
| 463 | + ), | |
| 464 | + 'frequently-bought-together' => array( | |
| 465 | + 'title' => esc_html__( 'Frequently Bought Together', 'merchant' ), | |
| 466 | + 'desc' => esc_html__( 'Create bundles of related products that customers can add to their cart with just one click', 'merchant' ), | |
| 467 | + 'tutorial_url' => 'https://docs.athemes.com/article/merchant-frequently-bought-together/', | |
| 468 | + ), | |
| 469 | + 'buy-x-get-y' => array( | |
| 470 | + 'title' => esc_html__( 'Buy X, Get Y', 'merchant' ), | |
| 471 | + 'desc' => esc_html__( 'Create offers where purchasing a specific quantity of Product X triggers a discount on Product Y', 'merchant' ), | |
| 472 | + 'tutorial_url' => 'https://docs.athemes.com/article/merchant-buy-x-get-y/', | |
| 473 | + ), | |
| 474 | + 'complementary-products' => array( | |
| 475 | + 'title' => esc_html__( 'Complementary Products', 'merchant' ), | |
| 476 | + 'desc' => esc_html__( 'Offer complementary products to help increase average order value', 'merchant' ), | |
| 477 | + 'tutorial_url' => 'https://docs.athemes.com/article/merchant-complementary-products/', | |
| 478 | + ), | |
| 479 | + 'volume-discounts' => array( | |
| 480 | + 'title' => esc_html__( 'Bulk Discounts', 'merchant' ), | |
| 481 | + 'desc' => esc_html__( 'Offer discounts on larger quantity purchases to drive up average order value', 'merchant' ), | |
| 482 | + 'tutorial_url' => 'https://docs.athemes.com/article/merchant-bulk-discounts/', | |
| 483 | + ), | |
| 484 | + 'storewide-sale' => array( | |
| 485 | + 'title' => esc_html__( 'Storewide Sale', 'merchant' ), | |
| 486 | + 'desc' => esc_html__( 'Create discount campaigns for all your products, specific categories, or specific products', 'merchant' ), | |
| 487 | + 'tutorial_url' => 'https://docs.athemes.com/article/merchant-storewide-sale/', | |
| 488 | + ), | |
| 489 | + 'spending-goal' => array( | |
| 490 | + 'title' => esc_html__( 'Spending Discount Goal', 'merchant' ), | |
| 491 | + 'desc' => esc_html__( 'Motivate higher order values by offering customers discounts for reaching spending goals', 'merchant' ), | |
| 492 | + 'tutorial_url' => 'https://docs.athemes.com/article/merchant-spending-goal/', | |
| 493 | + ), | |
| 494 | + 'free-gifts' => array( | |
| 495 | + 'title' => esc_html__( 'Free Gifts', 'merchant' ), | |
| 496 | + 'desc' => esc_html__( 'Reward shoppers with a gift if they hit a specified spending target or apply a coupon', 'merchant' ), | |
| 497 | + 'tutorial_url' => 'https://docs.athemes.com/article/merchant-gift-card/', | |
| 498 | + ), | |
| 499 | + 'free-shipping-progress-bar' => array( | |
| 500 | + 'title' => esc_html__( 'Free Shipping Bar', 'merchant' ), | |
| 501 | + 'desc' => esc_html__( 'Encourage customers to spend more by displaying the amount left needed for free shipping', 'merchant' ), | |
| 502 | + 'tutorial_url' => 'https://docs.athemes.com/article/merchant-free-shipping-progress-bar/', | |
| 503 | + ), | |
| 504 | + 'product-labels' => array( | |
| 505 | + 'title' => esc_html__( 'Product Labels', 'merchant' ), | |
| 506 | + 'desc' => esc_html__( 'Create customizable product labels with display conditions and color settings', 'merchant' ), | |
| 507 | + 'tutorial_url' => 'https://docs.athemes.com/article/product-labels/', | |
| 508 | + ), | |
| 509 | + 'quick-view' => array( | |
| 510 | + 'title' => esc_html__( 'Quick View', 'merchant' ), | |
| 511 | + 'desc' => esc_html__( 'Allows users to quickly view product details without leaving the current page', 'merchant' ), | |
| 512 | + 'tutorial_url' => 'https://docs.athemes.com/article/quick-view/', | |
| 513 | + ), | |
| 514 | + 'added-to-cart-popup' => array( | |
| 515 | + 'title' => esc_html__( 'Added To Cart Popup', 'merchant' ), | |
| 516 | + 'desc' => esc_html__( 'Display a dynamic popup with product suggestions when items are added to the cart', 'merchant' ), | |
| 517 | + 'tutorial_url' => 'https://docs.athemes.com/article/merchant-added-to-cart-popup/', | |
| 518 | + ), | |
| 519 | + 'countdown-timer' => array( | |
| 520 | + 'title' => esc_html__( 'Countdown Timer', 'merchant' ), | |
| 521 | + 'desc' => esc_html__( 'Create a sense of urgency by displaying a countdown timer on your discounted products', 'merchant' ), | |
| 522 | + 'tutorial_url' => 'https://docs.athemes.com/article/merchant-countdown-timer/', | |
| 523 | + ), | |
| 524 | + 'stock-scarcity' => array( | |
| 525 | + 'title' => esc_html__( 'Stock Scarcity', 'merchant' ), | |
| 526 | + 'desc' => esc_html__( 'Let visitors know that stock is running low on products they are looking at', 'merchant' ), | |
| 527 | + 'tutorial_url' => 'https://docs.athemes.com/article/merchant-stock-scarcity/', | |
| 528 | + ), | |
| 529 | + 'checkout' => array( | |
| 530 | + 'title' => esc_html__( 'Checkouts', 'merchant' ), | |
| 531 | + 'desc' => esc_html__( 'Choose from three different checkout layouts: Shopify-style, Multi-step or One-page', 'merchant' ), | |
| 532 | + 'tutorial_url' => 'https://docs.athemes.com/article/merchant-checkouts/', | |
| 533 | + ), | |
| 534 | + 'delivery-pickup' => array( | |
| 535 | + 'title' => esc_html__( 'Delivery & Pickup', 'merchant' ), | |
| 536 | + 'desc' => esc_html__( 'Let customers choose a delivery date, a time slot or a shop to collect from, and charge for the slots you want', 'merchant' ), | |
| 537 | + 'tutorial_url' => 'https://docs.athemes.com/article/merchant-delivery-pickup/', | |
| 538 | + ), | |
| 539 | + 'sticky-add-to-cart' => array( | |
| 540 | + 'title' => esc_html__( 'Sticky Add To Cart', 'merchant' ), | |
| 541 | + 'desc' => esc_html__( 'Display a sticky add to cart bar when visitors are scrolling on your product pages', 'merchant' ), | |
| 542 | + 'tutorial_url' => 'https://docs.athemes.com/article/merchant-sticky-add-to-cart/', | |
| 543 | + ), | |
| 544 | + 'recently-viewed-products' => array( | |
| 545 | + 'title' => esc_html__( 'Recently Viewed Products', 'merchant' ), | |
| 546 | + 'desc' => esc_html__( 'Show recently viewed products on product pages and in the cart', 'merchant' ), | |
| 547 | + 'tutorial_url' => 'https://docs.athemes.com/article/merchant-recently-viewed-products/', | |
| 548 | + ), | |
| 549 | + 'buy-now' => array( | |
| 550 | + 'title' => esc_html__( 'Buy Now', 'merchant' ), | |
| 551 | + 'desc' => esc_html__( 'Send your customers directly to checkout instead of the cart with Buy Now buttons', 'merchant' ), | |
| 552 | + 'tutorial_url' => 'https://docs.athemes.com/article/buy-now/', | |
| 553 | + ), | |
| 554 | + 'cart-count-favicon' => array( | |
| 555 | + 'title' => esc_html__( 'Cart Count Favicon', 'merchant' ), | |
| 556 | + 'desc' => esc_html__( 'Make your browser tab stand out by showing the number of items in the cart on the favicon', 'merchant' ), | |
| 557 | + 'tutorial_url' => 'https://docs.athemes.com/article/cart-count-favicon/', | |
| 558 | + ), | |
| 559 | + 'inactive-tab-message' => array( | |
| 560 | + 'title' => esc_html__( 'Inactive Tab Message', 'merchant' ), | |
| 561 | + 'desc' => esc_html__( 'Modify the browser tab\'s title when the visitor navigates away from your store', 'merchant' ), | |
| 562 | + 'tutorial_url' => 'https://docs.athemes.com/article/merchant-inactive-tab-message/', | |
| 563 | + ), | |
| 564 | + 'cart-reserved-timer' => array( | |
| 565 | + 'title' => esc_html__( 'Cart Reserved Timer', 'merchant' ), | |
| 566 | + 'desc' => esc_html__( 'Create urgency by letting visitors know that the products in cart are reserved for a limited time', 'merchant' ), | |
| 567 | + 'tutorial_url' => 'https://docs.athemes.com/article/merchant-cart-reserved-timer/', | |
| 568 | + ), | |
| 569 | + 'side-cart' => array( | |
| 570 | + 'title' => esc_html__( 'Side Cart', 'merchant' ), | |
| 571 | + 'desc' => esc_html__( 'Show a sliding cart whenever a customer adds a product to the cart', 'merchant' ), | |
| 572 | + 'tutorial_url' => 'https://docs.athemes.com/article/merchant-side-cart/', | |
| 573 | + ), | |
| 574 | + 'payment-logos' => array( | |
| 575 | + 'title' => esc_html__( 'Payment Logos', 'merchant' ), | |
| 576 | + 'desc' => esc_html__( 'Display the logos of the payment methods you accept on product pages', 'merchant' ), | |
| 577 | + 'tutorial_url' => 'https://docs.athemes.com/article/payment-logos/', | |
| 578 | + ), | |
| 579 | + 'trust-badges' => array( | |
| 580 | + 'title' => esc_html__( 'Trust Badges', 'merchant' ), | |
| 581 | + 'desc' => esc_html__( 'Reassure customers by showcasing different badge-shaped store benefits', 'merchant' ), | |
| 582 | + 'tutorial_url' => 'https://docs.athemes.com/article/trust-badges/', | |
| 583 | + ), | |
| 584 | + 'advanced-reviews' => array( | |
| 585 | + 'title' => esc_html__( 'Advanced Reviews', 'merchant' ), | |
| 586 | + 'desc' => esc_html__( 'Enhance your customer reviews with advanced features including photo uploads and more', 'merchant' ), | |
| 587 | + 'tutorial_url' => 'https://docs.athemes.com/article/merchant-advanced-reviews/', | |
| 588 | + ), | |
| 589 | + 'recent-sales-notifications' => array( | |
| 590 | + 'title' => esc_html__( 'Recent Sales Notifications', 'merchant' ), | |
| 591 | + 'desc' => esc_html__( 'Build trust by displaying real-time notifications of purchases and other user activity on your store', 'merchant' ), | |
| 592 | + 'tutorial_url' => 'https://docs.athemes.com/article/merchant-recent-sales-notifications/', | |
| 593 | + ), | |
| 594 | + 'reasons-to-buy' => array( | |
| 595 | + 'title' => esc_html__( 'Reasons To Buy List', 'merchant' ), | |
| 596 | + 'desc' => esc_html__( 'Provide customers with a summary of the key features and benefits of your products', 'merchant' ), | |
| 597 | + 'tutorial_url' => 'https://docs.athemes.com/article/merchant-reasons-to-buy/', | |
| 598 | + ), | |
| 599 | + 'quick-social-links' => array( | |
| 600 | + 'title' => esc_html__( 'Quick Social Links', 'merchant' ), | |
| 601 | + 'desc' => esc_html__( 'Display floating social media icons to make it easier for your customers to connect with you', 'merchant' ), | |
| 602 | + 'tutorial_url' => 'https://docs.athemes.com/article/merchant-quick-social-links/', | |
| 603 | + ), | |
| 604 | + 'product-brand-image' => array( | |
| 605 | + 'title' => esc_html__( 'Product Brand Image', 'merchant' ), | |
| 606 | + 'desc' => esc_html__( 'Add brand images to products to instill confidence in potential buyers', 'merchant' ), | |
| 607 | + 'tutorial_url' => 'https://docs.athemes.com/article/merchant-product-brand-image/', | |
| 608 | + ), | |
| 609 | + 'animated-add-to-cart' => array( | |
| 610 | + 'title' => esc_html__( 'Animated Add to Cart', 'merchant' ), | |
| 611 | + 'desc' => esc_html__( 'Make your Add To Cart button stand out by adding an animation on mouse over or page load', 'merchant' ), | |
| 612 | + 'tutorial_url' => 'https://docs.athemes.com/article/animated-add-to-cart/', | |
| 613 | + ), | |
| 614 | + 'add-to-cart-text' => array( | |
| 615 | + 'title' => esc_html__( 'Add To Cart Text', 'merchant' ), | |
| 616 | + 'desc' => esc_html__( 'Change your store\'s \'Add to Cart\' text for various product types, as well as individual products', 'merchant' ), | |
| 617 | + 'tutorial_url' => 'https://docs.athemes.com/article/merchant-add-to-cart-text/', | |
| 618 | + ), | |
| 619 | + 'auto-external-links' => array( | |
| 620 | + 'title' => esc_html__( 'Auto External Links', 'merchant' ), | |
| 621 | + 'desc' => esc_html__( 'Keep users from navigating away from your store by opening external links in a new browser tab', 'merchant' ), | |
| 622 | + 'tutorial_url' => 'https://docs.athemes.com/article/auto-external-links/', | |
| 623 | + ), | |
| 624 | + 'real-time-search' => array( | |
| 625 | + 'title' => esc_html__( 'Real-Time Search', 'merchant' ), | |
| 626 | + 'desc' => esc_html__( 'Help visitors instantly find the products they\'re looking for by using predictive search', 'merchant' ), | |
| 627 | + 'tutorial_url' => 'https://docs.athemes.com/article/real-time-search/', | |
| 628 | + ), | |
| 629 | + 'scroll-to-top-button' => array( | |
| 630 | + 'title' => esc_html__( 'Scroll to Top Button', 'merchant' ), | |
| 631 | + 'desc' => esc_html__( 'Help your customers get back easily to the top of the page with a single click', 'merchant' ), | |
| 632 | + 'tutorial_url' => 'https://docs.athemes.com/article/scroll-to-top-button/', | |
| 633 | + ), | |
| 634 | + 'address-autocomplete' => array( | |
| 635 | + 'title' => esc_html__( 'Google Address Autocomplete', 'merchant' ), | |
| 636 | + 'desc' => esc_html__( 'Streamline your checkout process and reduce user errors by autocompleting the address fields', 'merchant' ), | |
| 637 | + 'tutorial_url' => 'https://docs.athemes.com/article/merchant-google-address-autocomplete/', | |
| 638 | + ), | |
| 639 | + 'size-chart' => array( | |
| 640 | + 'title' => esc_html__( 'Size Chart', 'merchant' ), | |
| 641 | + 'desc' => esc_html__( 'Reduce returns and increase sales by showing a size chart on specific products or all products', 'merchant' ), | |
| 642 | + 'tutorial_url' => 'https://docs.athemes.com/article/merchant-size-chart/', | |
| 643 | + ), | |
| 644 | + 'product-swatches' => array( | |
| 645 | + 'title' => esc_html__( 'Variation Swatches', 'merchant' ), | |
| 646 | + 'desc' => esc_html__( 'Display variable product options as customizable color/image icons, buttons, or dropdowns', 'merchant' ), | |
| 647 | + 'tutorial_url' => 'https://docs.athemes.com/article/merchant-variation-swatches/', | |
| 648 | + ), | |
| 649 | + 'wishlist' => array( | |
| 650 | + 'title' => esc_html__( 'Wishlist', 'merchant' ), | |
| 651 | + 'desc' => esc_html__( 'Allow customers to easily save products they are interested in for later', 'merchant' ), | |
| 652 | + 'tutorial_url' => 'https://docs.athemes.com/article/merchant-wishlist/', | |
| 653 | + ), | |
| 654 | + 'product-navigation-links' => array( | |
| 655 | + 'title' => esc_html__( 'Product Navigation Links', 'merchant' ), | |
| 656 | + 'desc' => esc_html__( 'Enable easy navigation from one product to the next with next/previous links', 'merchant' ), | |
| 657 | + 'tutorial_url' => 'https://docs.athemes.com/article/merchant-product-navigation-links/', | |
| 658 | + ), | |
| 659 | + 'product-video' => array( | |
| 660 | + 'title' => esc_html__( 'Product Video', 'merchant' ), | |
| 661 | + 'desc' => esc_html__( 'Upload video to be viewed in product galleries and on archive pages', 'merchant' ), | |
| 662 | + 'tutorial_url' => 'https://docs.athemes.com/article/merchant-product-video/', | |
| 663 | + ), | |
| 664 | + 'product-audio' => array( | |
| 665 | + 'title' => esc_html__( 'Product Audio', 'merchant' ), | |
| 666 | + 'desc' => esc_html__( 'Upload audio to be listened to in product galleries and on archive pages', 'merchant' ), | |
| 667 | + 'tutorial_url' => 'https://docs.athemes.com/article/merchant-product-audio/', | |
| 668 | + ), | |
| 669 | + 'login-popup' => array( | |
| 670 | + 'title' => esc_html__( 'Login Popup', 'merchant' ), | |
| 671 | + 'desc' => esc_html__( 'Allow users to log in with a simple pop up without navigating to a new page', 'merchant' ), | |
| 672 | + 'tutorial_url' => 'https://docs.athemes.com/article/merchant-login-popup/', | |
| 673 | + ), | |
| 674 | + 'clear-cart' => array( | |
| 675 | + 'title' => esc_html__( 'Clear Cart', 'merchant' ), | |
| 676 | + 'desc' => esc_html__( 'Display a clear cart button to let customers empty their carts and start fresh', 'merchant' ), | |
| 677 | + 'tutorial_url' => 'https://docs.athemes.com/article/merchant-clear-cart/', | |
| 678 | + ), | |
| 679 | + 'agree-to-terms-checkbox' => array( | |
| 680 | + 'title' => esc_html__( 'Agree to Terms Checkbox', 'merchant' ), | |
| 681 | + 'desc' => esc_html__( 'Get customers to agree to your Terms & Conditions as part of the checkout process', 'merchant' ), | |
| 682 | + 'tutorial_url' => 'https://docs.athemes.com/article/agree-to-terms-checkbox/', | |
| 683 | + ), | |
| 684 | + 'cookie-banner' => array( | |
| 685 | + 'title' => esc_html__( 'Cookie Banner', 'merchant' ), | |
| 686 | + 'desc' => esc_html__( 'Inform your visitors that the site uses cookies via a dismissable banner', 'merchant' ), | |
| 687 | + 'tutorial_url' => 'https://docs.athemes.com/article/cookie-banner/', | |
| 688 | + ), | |
| 689 | + ) ); | |
| 690 | + } | |
| 691 | + } | |
| 692 | + | |
| 693 | + Merchant_Admin_Modules::instance(); | |
| 694 | +} | |