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

150 lines 5.1 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 you 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.', 'merchant' ),
58 'desc' => esc_html__( 'The message that will show after clicking on unsubscribe link.', 'merchant' ),
59 ),
60 ),
61 ) );
62
63 Merchant_Admin_Options::create( array(
64 'title' => esc_html__( 'Email Settings', 'merchant' ),
65 'module' => Merchant_Wait_List::MODULE_ID,
66 'fields' => array(
67
68 array(
69 'id' => 'use_automatic_emails',
70 'type' => 'switcher',
71 'title' => __( 'Send emails automatically', 'merchant' ),
72 'default' => 0,
73 'desc' => esc_html__( 'When products are back in stock, send emails automatically to subscribers to let them know.', 'merchant' ),
74 ),
75
76 array(
77 'id' => 'email_new_subscriber',
78 'type' => 'textarea_multiline',
79 'title' => esc_html__( 'Email new subscribers', 'merchant' ),
80 'default' => __( 'Hello, thank you for joining the stock notification list for {product}. We will email you when the product is back in stock.', 'merchant' ),
81 'desc' => esc_html__( 'The message that will be sent to new subscribers.', 'merchant' ),
82 ),
83
84 array(
85 'type' => 'info',
86 'content' => sprintf(
87 /* Translators: 1. docs link */
88 __( 'Click <a href="%1$s" target="_blank">here</a> to preview the new subscriber email.', 'merchant' ),
89 esc_url(
90 add_query_arg(
91 array(
92 'action' => 'merchant_pro_preview_new_subscriber_email',
93 'nonce' => wp_create_nonce( 'merchant_pro_wait_list_mailer_preview' ),
94 ),
95 admin_url( 'admin-post.php' )
96 )
97 )
98 ),
99 ),
100
101 array(
102 'id' => 'email_update',
103 'type' => 'textarea_multiline',
104 'title' => esc_html__( 'Email in stock update', 'merchant' ),
105 'default' => __( 'Hello, we’re pleased to let you know that {product} is now back in stock.',
106 'merchant' ),
107 'desc' => esc_html__( 'The message that will be sent to subscribers when a product is back in stock.', 'merchant' ),
108 ),
109 array(
110 'type' => 'info',
111 'content' => sprintf(
112 /* Translators: 1. docs link */
113 __( 'Click <a href="%1$s" target="_blank">here</a> to preview the stock update email.', 'merchant' ),
114 esc_url(
115 add_query_arg(
116 array(
117 'action' => 'merchant_pro_preview_stock_update_email',
118 'nonce' => wp_create_nonce( 'merchant_pro_wait_list_mailer_preview' ),
119 ),
120 admin_url( 'admin-post.php' )
121 )
122 )
123 ),
124 ),
125 ),
126 ) );
127
128 // Shortcode
129 $merchant_module_id = Merchant_Wait_List::MODULE_ID;
130 Merchant_Admin_Options::create( array(
131 'module' => $merchant_module_id,
132 'title' => esc_html__( 'Use shortcode', 'merchant' ),
133 'fields' => array(
134 array(
135 'id' => 'use_shortcode',
136 'type' => 'switcher',
137 'title' => __( 'Use shortcode', 'merchant' ),
138 'default' => 0,
139 'desc' => 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.',
140 'merchant' ),
141 ),
142 array(
143 'id' => 'shortcode_text',
144 'type' => 'text_readonly',
145 'title' => esc_html__( 'Shortcode text', 'merchant' ),
146 'default' => '[merchant_module_' . str_replace( '-', '_', $merchant_module_id ) . ']',
147 'condition' => array( 'use_shortcode', '==', '1' ),
148 ),
149 ),
150 ) );