PluginProbe
Product Labels, Quick View, Buy Now, Pre-Orders, Frequently Bought Together & More for WooCommerce – Merchant / 2.3.2
Product Labels, Quick View, Buy Now, Pre-Orders, Frequently Bought Together & More for WooCommerce – Merchant v2.3.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
← All changes | inc/modules/wait-list/admin/options.php +33 -17 1.9.102.3.2 View file →
@@ -1,9 +1,12 @@
1 1 <?php
2 2
3 3 /**
4 - * Wait List Options.
4 + * Wait List — Option group definitions.
5 5 *
6 + * Pure data file. Returns the option groups array
7 + * consumed by init_option_groups().
8 + *
6 9 * @package Merchant
7 10 */
8 11
9 12 if ( ! defined( 'ABSPATH' ) ) {
@@ -10,9 +13,11 @@
10 13 exit; // Exit if accessed directly
11 14 }
12 15
13 16 // Form Settings
14 -Merchant_Admin_Options::create( array(
17 +
18 +return array(
19 + array(
15 20 'title' => esc_html__( 'Form Settings', 'merchant' ),
16 21 'module' => Merchant_Wait_List::MODULE_ID,
17 22 'fields' => array(
18 23
@@ -46,9 +51,9 @@
46 51 array(
47 52 'id' => 'form_success_message',
48 53 'type' => 'textarea',
49 54 '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 you via email.', 'merchant' ),
55 + '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 56 'desc' => esc_html__( 'The message that will show after form submission.', 'merchant' ),
52 57 ),
53 58 array(
54 59 'id' => 'form_unsubscribe_message',
@@ -53,10 +58,10 @@
53 58 array(
54 59 'id' => 'form_unsubscribe_message',
55 60 'type' => 'textarea',
56 61 'title' => esc_html__( 'Form unsubscribe message', 'merchant' ),
57 - 'default' => __( 'You have been successfully unsubscribed from our stock waitlist.', 'merchant' ),
58 - 'desc' => esc_html__( 'The message that will show after clicking on unsubscribe link.', 'merchant' ),
62 + 'default' => __( 'You have been successfully unsubscribed from our stock waitlist for this product.', 'merchant' ),
63 + 'desc' => esc_html__( 'The message that will show after clicking on the unsubscribe link.', 'merchant' ),
59 64 ),
60 65 array(
61 66 'id' => 'exclude_products',
62 67 'type' => 'products_selector',
@@ -61,15 +66,20 @@
61 66 'id' => 'exclude_products',
62 67 'type' => 'products_selector',
63 68 'title' => esc_html__( 'Exclude products', 'merchant' ),
64 69 'multiple' => true,
65 - 'desc' => esc_html__( 'Select the products that will be excluded from the waitlist.', 'merchant' ),
70 + 'desc' => esc_html__( 'Select any products that will be excluded from the waitlist.', 'merchant' ),
66 71 'allowed_types' => array( 'simple', 'variable' ),
72 + 'ai_meta' => array(
73 + 'entity' => 'product',
74 + 'reference_type' => 'static',
75 + 'value_format' => 'product_id',
76 + 'usage_hint' => 'Specific products to exclude from the waitlist globally. Static: only the selected products are excluded. For module-wide exclusion of simple and variable products by ID.',
77 + ),
67 78 ),
68 79 ),
69 -) );
70 -
71 -Merchant_Admin_Options::create( array(
80 +),
81 + array(
72 82 'title' => esc_html__( 'Email Settings', 'merchant' ),
73 83 'module' => Merchant_Wait_List::MODULE_ID,
74 84 'fields' => array(
75 85
@@ -81,8 +91,16 @@
81 91 'desc' => esc_html__( 'When products are back in stock, send emails automatically to subscribers to let them know.', 'merchant' ),
82 92 ),
83 93
84 94 array(
95 + 'id' => 'show_notified_users',
96 + 'type' => 'switcher',
97 + 'title' => __( 'Show notified users', 'merchant' ),
98 + 'default' => 1,
99 + 'desc' => esc_html__( 'When products are back in stock, show an admin notice with a list of the notified users', 'merchant' ),
100 + ),
101 +
102 + array(
85 103 'id' => 'email_new_subscriber',
86 104 'type' => 'textarea_multiline',
87 105 'title' => esc_html__( 'Email new subscribers', 'merchant' ),
88 106 'default' => __( 'Hello, thank you for joining the stock notification list for {product}. We will email you when the product is back in stock.', 'merchant' ),
@@ -132,14 +150,11 @@
132 150 )
133 151 ),
134 152 ),
135 153 ),
136 -) );
137 -
138 -// Shortcode
139 -$merchant_module_id = Merchant_Wait_List::MODULE_ID;
140 -Merchant_Admin_Options::create( array(
141 - 'module' => $merchant_module_id,
154 +),
155 + array(
156 + 'module' => Merchant_Wait_List::MODULE_ID,
142 157 'title' => esc_html__( 'Use shortcode', 'merchant' ),
143 158 'fields' => array(
144 159 array(
145 160 'id' => 'use_shortcode',
@@ -155,9 +170,10 @@
155 170 array(
156 171 'id' => 'shortcode_text',
157 172 'type' => 'text_readonly',
158 173 'title' => esc_html__( 'Shortcode text', 'merchant' ),
159 - 'default' => '[merchant_module_' . str_replace( '-', '_', $merchant_module_id ) . ']',
174 + 'default' => '[merchant_module_' . str_replace( '-', '_', Merchant_Wait_List::MODULE_ID ) . ']',
160 175 'condition' => array( 'use_shortcode', '==', '1' ),
161 176 ),
162 177 ),
163 -) );
178 +),
179 +);