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

171 lines 5.8 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' => 'show_notified_users',
86 'type' => 'switcher',
87 'title' => __( 'Show notified users', 'merchant' ),
88 'default' => 1,
89 'desc' => esc_html__( 'When products are back in stock, show an admin notice with a list of the notified users', 'merchant' ),
90 ),
91
92 array(
93 'id' => 'email_new_subscriber',
94 'type' => 'textarea_multiline',
95 'title' => esc_html__( 'Email new subscribers', 'merchant' ),
96 'default' => __( 'Hello, thank you for joining the stock notification list for {product}. We will email you when the product is back in stock.', 'merchant' ),
97 'desc' => esc_html__( 'The message that will be sent to new subscribers.', 'merchant' ),
98 ),
99
100 array(
101 'id' => 'email_new_subscriber_info',
102 'type' => 'info',
103 'content' => sprintf(
104 /* Translators: 1. docs link */
105 __( 'Click <a href="%1$s" target="_blank">here</a> to preview the new subscriber email.', 'merchant' ),
106 esc_url(
107 add_query_arg(
108 array(
109 'action' => 'merchant_pro_preview_new_subscriber_email',
110 'nonce' => wp_create_nonce( 'merchant_pro_wait_list_mailer_preview' ),
111 ),
112 admin_url( 'admin-post.php' )
113 )
114 )
115 ),
116 ),
117
118 array(
119 'id' => 'email_update',
120 'type' => 'textarea_multiline',
121 'title' => esc_html__( 'Email in stock update', 'merchant' ),
122 'default' => __( 'Hello, we’re pleased to let you know that {product} is now back in stock.',
123 'merchant' ),
124 'desc' => esc_html__( 'The message that will be sent to subscribers when a product is back in stock.', 'merchant' ),
125 ),
126 array(
127 'id' => 'email_update_info',
128 'type' => 'info',
129 'content' => sprintf(
130 /* Translators: 1. docs link */
131 __( 'Click <a href="%1$s" target="_blank">here</a> to preview the stock update email.', 'merchant' ),
132 esc_url(
133 add_query_arg(
134 array(
135 'action' => 'merchant_pro_preview_stock_update_email',
136 'nonce' => wp_create_nonce( 'merchant_pro_wait_list_mailer_preview' ),
137 ),
138 admin_url( 'admin-post.php' )
139 )
140 )
141 ),
142 ),
143 ),
144 ) );
145
146 // Shortcode
147 $merchant_module_id = Merchant_Wait_List::MODULE_ID;
148 Merchant_Admin_Options::create( array(
149 'module' => $merchant_module_id,
150 'title' => esc_html__( 'Use shortcode', 'merchant' ),
151 'fields' => array(
152 array(
153 'id' => 'use_shortcode',
154 'type' => 'switcher',
155 'title' => __( 'Use shortcode', 'merchant' ),
156 'default' => 0,
157 ),
158 array(
159 'type' => 'info',
160 'id' => 'shortcode_info',
161 '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' ),
162 ),
163 array(
164 'id' => 'shortcode_text',
165 'type' => 'text_readonly',
166 'title' => esc_html__( 'Shortcode text', 'merchant' ),
167 'default' => '[merchant_module_' . str_replace( '-', '_', $merchant_module_id ) . ']',
168 'condition' => array( 'use_shortcode', '==', '1' ),
169 ),
170 ),
171 ) );