PluginProbe
Product Labels, Quick View, Buy Now, Pre-Orders, Frequently Bought Together & More for WooCommerce – Merchant / 1.10.3
Product Labels, Quick View, Buy Now, Pre-Orders, Frequently Bought Together & More for WooCommerce – Merchant v1.10.3
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 / inc / modules / wait-list / admin / options.php

options.php in Product Labels, Quick View, Buy Now, Pre-Orders, Frequently Bought Together & More for WooCommerce – Merchant 1.10.3, at inc/modules/wait-list/admin/options.php

163 lines 5.5 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 /**
4 * Wait List Options.
5 *
6 * @package Merchant
7 */
8
9 if ( ! defined( 'ABSPATH' ) ) {
10 exit; // Exit if accessed directly
11 }
12
13 // Form Settings
14 Merchant_Admin_Options::create( array(
15 'title' => esc_html__( 'Form Settings', 'merchant' ),
16 'module' => Merchant_Wait_List::MODULE_ID,
17 'fields' => array(
18
19 array(
20 'id' => 'display_on_backorders',
21 'type' => 'switcher',
22 'title' => esc_html__( 'Display on backorders?', 'merchant' ),
23 ),
24
25 array(
26 'id' => 'form_title',
27 'type' => 'text',
28 'title' => esc_html__( 'Form title', 'merchant' ),
29 'default' => __( 'Email me when this item is back in stock.', 'merchant' ),
30 ),
31
32 array(
33 'id' => 'form_email_label',
34 'type' => 'text',
35 'title' => esc_html__( 'Form email label', 'merchant' ),
36 'default' => __( 'Your Email Address', 'merchant' ),
37 ),
38
39 array(
40 'id' => 'form_button_text',
41 'type' => 'text',
42 'title' => esc_html__( 'Form button text', 'merchant' ),
43 'default' => __( 'Notify Me', 'merchant' ),
44 ),
45
46 array(
47 'id' => 'form_success_message',
48 'type' => 'textarea',
49 'title' => esc_html__( 'Form success message', 'merchant' ),
50 'default' => __( 'You are now subscribed to our stock notification list for this product. When stock becomes available, we will let you know via email.', 'merchant' ),
51 'desc' => esc_html__( 'The message that will show after form submission.', 'merchant' ),
52 ),
53 array(
54 'id' => 'form_unsubscribe_message',
55 'type' => 'textarea',
56 'title' => esc_html__( 'Form unsubscribe message', 'merchant' ),
57 'default' => __( 'You have been successfully unsubscribed from our stock waitlist for this product.', 'merchant' ),
58 'desc' => esc_html__( 'The message that will show after clicking on the unsubscribe link.', 'merchant' ),
59 ),
60 array(
61 'id' => 'exclude_products',
62 'type' => 'products_selector',
63 'title' => esc_html__( 'Exclude products', 'merchant' ),
64 'multiple' => true,
65 'desc' => esc_html__( 'Select any products that will be excluded from the waitlist.', 'merchant' ),
66 'allowed_types' => array( 'simple', 'variable' ),
67 ),
68 ),
69 ) );
70
71 Merchant_Admin_Options::create( array(
72 'title' => esc_html__( 'Email Settings', 'merchant' ),
73 'module' => Merchant_Wait_List::MODULE_ID,
74 'fields' => array(
75
76 array(
77 'id' => 'use_automatic_emails',
78 'type' => 'switcher',
79 'title' => __( 'Send emails automatically', 'merchant' ),
80 'default' => 1,
81 'desc' => esc_html__( 'When products are back in stock, send emails automatically to subscribers to let them know.', 'merchant' ),
82 ),
83
84 array(
85 'id' => 'email_new_subscriber',
86 'type' => 'textarea_multiline',
87 'title' => esc_html__( 'Email new subscribers', 'merchant' ),
88 'default' => __( 'Hello, thank you for joining the stock notification list for {product}. We will email you when the product is back in stock.', 'merchant' ),
89 'desc' => esc_html__( 'The message that will be sent to new subscribers.', 'merchant' ),
90 ),
91
92 array(
93 'id' => 'email_new_subscriber_info',
94 'type' => 'info',
95 'content' => sprintf(
96 /* Translators: 1. docs link */
97 __( 'Click <a href="%1$s" target="_blank">here</a> to preview the new subscriber email.', 'merchant' ),
98 esc_url(
99 add_query_arg(
100 array(
101 'action' => 'merchant_pro_preview_new_subscriber_email',
102 'nonce' => wp_create_nonce( 'merchant_pro_wait_list_mailer_preview' ),
103 ),
104 admin_url( 'admin-post.php' )
105 )
106 )
107 ),
108 ),
109
110 array(
111 'id' => 'email_update',
112 'type' => 'textarea_multiline',
113 'title' => esc_html__( 'Email in stock update', 'merchant' ),
114 'default' => __( 'Hello, we’re pleased to let you know that {product} is now back in stock.',
115 'merchant' ),
116 'desc' => esc_html__( 'The message that will be sent to subscribers when a product is back in stock.', 'merchant' ),
117 ),
118 array(
119 'id' => 'email_update_info',
120 'type' => 'info',
121 'content' => sprintf(
122 /* Translators: 1. docs link */
123 __( 'Click <a href="%1$s" target="_blank">here</a> to preview the stock update email.', 'merchant' ),
124 esc_url(
125 add_query_arg(
126 array(
127 'action' => 'merchant_pro_preview_stock_update_email',
128 'nonce' => wp_create_nonce( 'merchant_pro_wait_list_mailer_preview' ),
129 ),
130 admin_url( 'admin-post.php' )
131 )
132 )
133 ),
134 ),
135 ),
136 ) );
137
138 // Shortcode
139 $merchant_module_id = Merchant_Wait_List::MODULE_ID;
140 Merchant_Admin_Options::create( array(
141 'module' => $merchant_module_id,
142 'title' => esc_html__( 'Use shortcode', 'merchant' ),
143 'fields' => array(
144 array(
145 'id' => 'use_shortcode',
146 'type' => 'switcher',
147 'title' => __( 'Use shortcode', 'merchant' ),
148 'default' => 0,
149 ),
150 array(
151 'type' => 'info',
152 'id' => 'shortcode_info',
153 'content' => esc_html__( 'If you are using a page builder or a theme that supports shortcodes, then you can output the module using the shortcode above. This might be useful if, for example, you find that you want to control the position of the module output more precisely than with the module settings. Note that the shortcodes can only be used on single product pages.', 'merchant' ),
154 ),
155 array(
156 'id' => 'shortcode_text',
157 'type' => 'text_readonly',
158 'title' => esc_html__( 'Shortcode text', 'merchant' ),
159 'default' => '[merchant_module_' . str_replace( '-', '_', $merchant_module_id ) . ']',
160 'condition' => array( 'use_shortcode', '==', '1' ),
161 ),
162 ),
163 ) );