@@ -7,7 +7,7 @@ public function __construct()
7
7
$ this ->id = 'academe_multiple_packages ' ;
8
8
9
9
// Title shown in admin
10
- $ this ->method_title = __ ('Package Grouping ' );
10
+ $ this ->method_title = __ ('Packages Grouping ' );
11
11
12
12
// Description shown in admin
13
13
$ this ->method_description = __ ('Group products in an order into shipping packages ' );
@@ -92,73 +92,72 @@ function get_settings($current_section = '')
92
92
$ shipping_classes = $ this ->get_shipping_classes ();
93
93
94
94
$ settings = apply_filters ('woocommerce_multi_packages_settings ' , array (
95
- 'multi_packages_options ' => array (
96
- 'id ' => 'multi_packages_options ' ,
97
- 'type ' => 'title ' ,
98
- 'title ' => __ ('Multiple Packages for Shipping ' , 'woocommerce ' ),
99
- 'desc ' => __ ('Separate your customer \'s shopping cart into groups or per product to display multiple shipping select boxes ' , 'woocommerce ' ),
100
- ),
101
-
102
- 'multi_packages_enabled ' => array (
103
- 'id ' => 'multi_packages_enabled ' ,
95
+ 'enabled ' => array (
104
96
'type ' => 'checkbox ' ,
105
- 'title ' => __ ('Enable Package Grouping ' , 'bolder-multi- package-woo ' ),
97
+ 'title ' => __ ('Enable Package Grouping ' , 'academe- package-config -woo ' ),
106
98
'default ' => 'yes ' ,
107
- 'desc ' => __ ('Enable Multiple Shipping Packages ' , 'bolder-multi-package-woo ' ),
99
+ 'desc ' => __ ('Enable Multiple Shipping Packages ' , 'academe-package-config-woo ' ),
100
+ ),
101
+
102
+ /*
103
+ // The title is not used anywhere, as this is not a distinct shipping method.
104
+ 'title' => array(
105
+ 'title' => __('Method Title', 'academe-package-config-woo'),
106
+ 'type' => 'text',
107
+ 'description' => __('This controls the title which the user sees during checkout.', 'academe-package-config-woo'),
108
+ 'default' => __('Packages Grouping', 'academe-package-config-woo'),
109
+ 'desc_tip' => true
108
110
),
111
+ */
109
112
110
- 'multi_packages_type ' => array (
111
- 'id ' => 'multi_packages_type ' ,
113
+ 'type ' => array (
112
114
'type ' => 'select ' ,
113
- 'title ' => __ ('Group By ' , 'bolder-multi- package-woo ' ),
114
- 'desc ' => __ ('How packages are defined, in groups or per product ' , 'bolder-multi- package-woo ' ),
115
+ 'title ' => __ ('Group By ' , 'academe- package-config -woo ' ),
116
+ 'desc ' => __ ('How packages are defined, in groups or per product ' , 'academe- package-config -woo ' ),
115
117
'default ' => 'shipping-class ' ,
116
118
'class ' => 'chosen_select ' ,
117
119
'desc_tip ' => true ,
118
120
'options ' => array (
119
- 'shipping-class ' => __ ('Shipping Class ' , 'bolder-multi- package-woo ' ),
120
- 'per-product ' => __ ('Product (individual) ' , 'bolder-multi- package-woo ' ),
121
- 'per-owner ' => __ ('Product Owner (vendor) ' , 'bolder-multi- package-woo ' ),
122
- 'product-meta ' => __ ('Custom Product Field ' , 'bolder-multi- package-woo ' ),
123
- 'product-meta_printtrail_package ' => __ ('Printtrail Package Names ' , 'bolder-multi- package-woo ' ),
121
+ 'shipping-class ' => __ ('Shipping Class ' , 'academe- package-config -woo ' ),
122
+ 'per-product ' => __ ('Product (individual) ' , 'academe- package-config -woo ' ),
123
+ 'per-owner ' => __ ('Product Owner (vendor) ' , 'academe- package-config -woo ' ),
124
+ 'product-meta ' => __ ('Custom Product Field ' , 'academe- package-config -woo ' ),
125
+ 'product-meta_printtrail_package ' => __ ('Printtrail Package Names ' , 'academe- package-config -woo ' ),
124
126
),
125
127
),
126
128
127
129
// TODO: validate and transform the value entered here.
128
130
// It should be a valid metafield key. The documentation is
129
131
// silent on what is "valid", but all examples seem to be
130
132
// lower-case ASCII with underscores for spaces.
131
- 'multi_packages_meta_field ' => array (
132
- 'id ' => 'multi_packages_meta_field ' ,
133
+ 'meta_field ' => array (
133
134
'type ' => 'text ' ,
134
135
'class ' => '' ,
135
136
'css ' => 'min-width:300px; ' ,
136
- 'title ' => __ ('Custom Field to Group By ' , 'bolder-multi- package-woo ' ),
137
- 'desc ' => '<em> ' . __ ('Custom product field key ' , 'bolder-multi- package-woo ' ) . '</em> ' ,
138
- 'default ' => __ ('' , 'bolder-multi- package-woo ' ),
139
- 'desc_tip ' => __ ('The custom product meta field name (key) used to group the products into shipping packages. ' , 'bolder-multi- package-woo ' ),
137
+ 'title ' => __ ('Custom Field to Group By ' , 'academe- package-config -woo ' ),
138
+ 'desc ' => '<em> ' . __ ('Custom product field key ' , 'academe- package-config -woo ' ) . '</em> ' ,
139
+ 'default ' => __ ('' , 'academe- package-config -woo ' ),
140
+ 'desc_tip ' => __ ('The custom product meta field name (key) used to group the products into shipping packages. ' , 'academe- package-config -woo ' ),
140
141
),
141
142
142
- 'multi_packages_free_shipping ' => array (
143
- 'id ' => 'multi_packages_free_shipping ' ,
143
+ 'free_shipping ' => array (
144
144
'type ' => 'multiselect ' ,
145
145
'class ' => 'chosen_select ' ,
146
- 'title ' => __ ('Free Shipping Classes ' , 'bolder-multi- package-woo ' ),
147
- 'desc ' => '<em> ' . __ ('\'Free_Shipping \' method must be enabled ' , 'bolder-multi- package-woo ' ) . '</em> ' ,
148
- 'default ' => __ ('Let me know when this item is back in stock! ' , 'bolder-multi- package-woo ' ),
149
- 'desc_tip ' => __ ('Exclude the selected shipping classes from being charged shipping ' , 'bolder-multi- package-woo ' ),
146
+ 'title ' => __ ('Free Shipping Classes ' , 'academe- package-config -woo ' ),
147
+ 'desc ' => '<em> ' . __ ('\'Free_Shipping \' method must be enabled ' , 'academe- package-config -woo ' ) . '</em> ' ,
148
+ 'default ' => __ ('Let me know when this item is back in stock! ' , 'academe- package-config -woo ' ),
149
+ 'desc_tip ' => __ ('Exclude the selected shipping classes from being charged shipping ' , 'academe- package-config -woo ' ),
150
150
'options ' => $ shipping_classes ,
151
151
),
152
152
153
- 'multi_packages_method_settings ' => array (
153
+ 'method_settings ' => array (
154
154
'id ' => 'multi_packages_method_settings ' ,
155
155
'type ' => 'title ' ,
156
156
'title ' => __ ('Shipping Method Restrictions When Grouping by Class ' , 'woocommerce ' ),
157
157
'desc ' => __ ('Select which shipping methods will be used for each shipping class package ' , 'woocommerce ' ),
158
158
),
159
159
160
160
'shipping_restrictions_classes ' => array (
161
- 'id ' => 'shipping_restrictions_classes ' ,
162
161
'type ' => 'shipping_restrictions_classes ' ,
163
162
),
164
163
));
0 commit comments