Version Description
Download this release
Release Info
| Developer | SkyVerge |
| Plugin | |
| Version | 2.6.0 |
| Comparing to | |
| See all releases | |
Code changes from version 2.5.0 to 2.6.0
i18n/languages/woocommerce-customizer-fa_IR.mo
CHANGED
|
Binary file
|
i18n/languages/woocommerce-customizer.pot
CHANGED
|
@@ -1,18 +1,26 @@
|
|
| 1 |
-
# Copyright (C)
|
| 2 |
# This file is distributed under the GNU General Public License v3.0.
|
| 3 |
msgid ""
|
| 4 |
msgstr ""
|
| 5 |
-
"Project-Id-Version: WooCommerce Customizer 2.
|
| 6 |
"Report-Msgid-Bugs-To: "
|
| 7 |
-
"https://
|
| 8 |
-
"POT-Creation-Date:
|
| 9 |
"MIME-Version: 1.0\n"
|
| 10 |
"Content-Type: text/plain; charset=utf-8\n"
|
| 11 |
"Content-Transfer-Encoding: 8bit\n"
|
| 12 |
-
"PO-Revision-Date:
|
| 13 |
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
| 14 |
"Language-Team: LANGUAGE <LL@li.org>\n"
|
| 15 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 16 |
#: includes/class-wc-customizer-settings.php:45
|
| 17 |
msgid "Customizer"
|
| 18 |
msgstr ""
|
|
@@ -30,286 +38,310 @@ msgid "Checkout"
|
|
| 30 |
msgstr ""
|
| 31 |
|
| 32 |
#: includes/class-wc-customizer-settings.php:65
|
| 33 |
-
#: includes/class-wc-customizer-settings.php:
|
| 34 |
msgid "Misc"
|
| 35 |
msgstr ""
|
| 36 |
|
| 37 |
-
#: includes/class-wc-customizer-settings.php:
|
| 38 |
-
#: includes/class-wc-customizer-settings.php:
|
| 39 |
msgid "Add to Cart Button Text"
|
| 40 |
msgstr ""
|
| 41 |
|
| 42 |
-
#: includes/class-wc-customizer-settings.php:
|
| 43 |
msgid "Simple Product"
|
| 44 |
msgstr ""
|
| 45 |
|
| 46 |
-
#: includes/class-wc-customizer-settings.php:
|
| 47 |
msgid "Changes the add to cart button text for simple products on all loop pages"
|
| 48 |
msgstr ""
|
| 49 |
|
| 50 |
-
#: includes/class-wc-customizer-settings.php:
|
| 51 |
msgid "Variable Product"
|
| 52 |
msgstr ""
|
| 53 |
|
| 54 |
-
#: includes/class-wc-customizer-settings.php:
|
| 55 |
msgid "Changes the add to cart button text for variable products on all loop pages"
|
| 56 |
msgstr ""
|
| 57 |
|
| 58 |
-
#: includes/class-wc-customizer-settings.php:
|
| 59 |
msgid "Grouped Product"
|
| 60 |
msgstr ""
|
| 61 |
|
| 62 |
-
#: includes/class-wc-customizer-settings.php:
|
| 63 |
msgid "Changes the add to cart button text for grouped products on all loop pages"
|
| 64 |
msgstr ""
|
| 65 |
|
| 66 |
-
#: includes/class-wc-customizer-settings.php:
|
| 67 |
msgid "Out of Stock Product"
|
| 68 |
msgstr ""
|
| 69 |
|
| 70 |
-
#: includes/class-wc-customizer-settings.php:
|
| 71 |
msgid ""
|
| 72 |
"Changes the add to cart button text for out of stock products on all loop "
|
| 73 |
"pages"
|
| 74 |
msgstr ""
|
| 75 |
|
| 76 |
-
#: includes/class-wc-customizer-settings.php:
|
| 77 |
-
#: includes/class-wc-customizer-settings.php:
|
| 78 |
msgid "Sale Flash"
|
| 79 |
msgstr ""
|
| 80 |
|
| 81 |
-
#: includes/class-wc-customizer-settings.php:
|
| 82 |
-
#: includes/class-wc-customizer-settings.php:
|
| 83 |
msgid "Sale badge text"
|
| 84 |
msgstr ""
|
| 85 |
|
| 86 |
-
#: includes/class-wc-customizer-settings.php:
|
| 87 |
msgid "Changes text for the sale flash on all loop pages. Default: \"Sale!\""
|
| 88 |
msgstr ""
|
| 89 |
|
| 90 |
-
#: includes/class-wc-customizer-settings.php:
|
| 91 |
-
#: includes/class-wc-customizer-settings.php:
|
| 92 |
#. translators: Placeholders: %1$s - <code>, %2$s - </code>
|
| 93 |
msgid "Use %1$s{percent}%2$s to insert percent off, e.g., \"{percent} off!\""
|
| 94 |
msgstr ""
|
| 95 |
|
| 96 |
-
#: includes/class-wc-customizer-settings.php:
|
| 97 |
-
#: includes/class-wc-customizer-settings.php:
|
| 98 |
msgid ""
|
| 99 |
"Shows \"up to n%\" for grouped or variable products if multiple percentages "
|
| 100 |
"are possible."
|
| 101 |
msgstr ""
|
| 102 |
|
| 103 |
-
#: includes/class-wc-customizer-settings.php:
|
| 104 |
msgid "Layout"
|
| 105 |
msgstr ""
|
| 106 |
|
| 107 |
-
#: includes/class-wc-customizer-settings.php:
|
| 108 |
msgid "Products displayed per page"
|
| 109 |
msgstr ""
|
| 110 |
|
| 111 |
-
#: includes/class-wc-customizer-settings.php:
|
| 112 |
msgid "Changes the number of products displayed per page"
|
| 113 |
msgstr ""
|
| 114 |
|
| 115 |
-
#: includes/class-wc-customizer-settings.php:
|
| 116 |
msgid "Product columns displayed per page"
|
| 117 |
msgstr ""
|
| 118 |
|
| 119 |
-
#: includes/class-wc-customizer-settings.php:
|
| 120 |
msgid "Changes the number of columns displayed per page"
|
| 121 |
msgstr ""
|
| 122 |
|
| 123 |
-
#: includes/class-wc-customizer-settings.php:
|
| 124 |
msgid "Product thumbnail columns displayed"
|
| 125 |
msgstr ""
|
| 126 |
|
| 127 |
-
#: includes/class-wc-customizer-settings.php:
|
| 128 |
msgid "Changes the number of product thumbnail columns displayed"
|
| 129 |
msgstr ""
|
| 130 |
|
| 131 |
-
#: includes/class-wc-customizer-settings.php:
|
| 132 |
msgid "Tab Titles"
|
| 133 |
msgstr ""
|
| 134 |
|
| 135 |
-
#: includes/class-wc-customizer-settings.php:
|
| 136 |
-
#: includes/class-wc-customizer-settings.php:
|
| 137 |
msgid "Product Description"
|
| 138 |
msgstr ""
|
| 139 |
|
| 140 |
-
#: includes/class-wc-customizer-settings.php:
|
| 141 |
msgid "Changes the Production Description tab title"
|
| 142 |
msgstr ""
|
| 143 |
|
| 144 |
-
#: includes/class-wc-customizer-settings.php:
|
| 145 |
-
#: includes/class-wc-customizer-settings.php:
|
| 146 |
msgid "Additional Information"
|
| 147 |
msgstr ""
|
| 148 |
|
| 149 |
-
#: includes/class-wc-customizer-settings.php:
|
| 150 |
msgid "Changes the Additional Information tab title"
|
| 151 |
msgstr ""
|
| 152 |
|
| 153 |
-
#: includes/class-wc-customizer-settings.php:
|
| 154 |
msgid "Tab Content Headings"
|
| 155 |
msgstr ""
|
| 156 |
|
| 157 |
-
#: includes/class-wc-customizer-settings.php:
|
| 158 |
msgid "Changes the Product Description tab heading"
|
| 159 |
msgstr ""
|
| 160 |
|
| 161 |
-
#: includes/class-wc-customizer-settings.php:
|
| 162 |
msgid "Changes the Additional Information tab heading"
|
| 163 |
msgstr ""
|
| 164 |
|
| 165 |
-
#: includes/class-wc-customizer-settings.php:
|
| 166 |
msgid "All Product Types"
|
| 167 |
msgstr ""
|
| 168 |
|
| 169 |
-
#: includes/class-wc-customizer-settings.php:
|
| 170 |
msgid ""
|
| 171 |
"Changes the Add to Cart button text on the single product page for all "
|
| 172 |
"product type"
|
| 173 |
msgstr ""
|
| 174 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 175 |
#: includes/class-wc-customizer-settings.php:296
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 176 |
msgid "Changes text for the sale flash on product pages. Default: \"Sale!\""
|
| 177 |
msgstr ""
|
| 178 |
|
| 179 |
-
#: includes/class-wc-customizer-settings.php:
|
| 180 |
msgid "Messages"
|
| 181 |
msgstr ""
|
| 182 |
|
| 183 |
-
#: includes/class-wc-customizer-settings.php:
|
| 184 |
msgid "Must be logged in text"
|
| 185 |
msgstr ""
|
| 186 |
|
| 187 |
-
#: includes/class-wc-customizer-settings.php:
|
| 188 |
msgid "Changes the message displayed when a customer must be logged in to checkout"
|
| 189 |
msgstr ""
|
| 190 |
|
| 191 |
-
#: includes/class-wc-customizer-settings.php:
|
| 192 |
msgid "Coupon text"
|
| 193 |
msgstr ""
|
| 194 |
|
| 195 |
-
#: includes/class-wc-customizer-settings.php:
|
| 196 |
msgid "Changes the message displayed if the coupon form is enabled on checkout"
|
| 197 |
msgstr ""
|
| 198 |
|
| 199 |
-
#: includes/class-wc-customizer-settings.php:
|
| 200 |
msgid "Login text"
|
| 201 |
msgstr ""
|
| 202 |
|
| 203 |
-
#: includes/class-wc-customizer-settings.php:
|
| 204 |
msgid "Changes the message displayed if customers can login at checkout"
|
| 205 |
msgstr ""
|
| 206 |
|
| 207 |
-
#: includes/class-wc-customizer-settings.php:
|
| 208 |
msgid "Create Account checkbox default"
|
| 209 |
msgstr ""
|
| 210 |
|
| 211 |
-
#: includes/class-wc-customizer-settings.php:
|
| 212 |
msgid "Control the default state for the Create Account checkbox"
|
| 213 |
msgstr ""
|
| 214 |
|
| 215 |
-
#: includes/class-wc-customizer-settings.php:
|
| 216 |
msgid "Checked"
|
| 217 |
msgstr ""
|
| 218 |
|
| 219 |
-
#: includes/class-wc-customizer-settings.php:
|
| 220 |
msgid "Unchecked"
|
| 221 |
msgstr ""
|
| 222 |
|
| 223 |
-
#: includes/class-wc-customizer-settings.php:
|
| 224 |
msgid "Submit Order button"
|
| 225 |
msgstr ""
|
| 226 |
|
| 227 |
-
#: includes/class-wc-customizer-settings.php:
|
| 228 |
msgid "Changes the Place Order button text on checkout"
|
| 229 |
msgstr ""
|
| 230 |
|
| 231 |
-
#: includes/class-wc-customizer-settings.php:
|
| 232 |
msgid "Tax"
|
| 233 |
msgstr ""
|
| 234 |
|
| 235 |
-
#: includes/class-wc-customizer-settings.php:
|
| 236 |
msgid "Tax Label"
|
| 237 |
msgstr ""
|
| 238 |
|
| 239 |
-
#: includes/class-wc-customizer-settings.php:
|
| 240 |
msgid "Changes the Taxes label. Defaults to Tax for USA, VAT for European countries"
|
| 241 |
msgstr ""
|
| 242 |
|
| 243 |
-
#: includes/class-wc-customizer-settings.php:
|
| 244 |
msgid "Including Tax Label"
|
| 245 |
msgstr ""
|
| 246 |
|
| 247 |
-
#: includes/class-wc-customizer-settings.php:
|
| 248 |
msgid ""
|
| 249 |
"Changes the Including Taxes label. Defaults to Inc. tax for USA, Inc. VAT "
|
| 250 |
"for European countries"
|
| 251 |
msgstr ""
|
| 252 |
|
| 253 |
-
#: includes/class-wc-customizer-settings.php:
|
| 254 |
msgid "Excluding Tax Label"
|
| 255 |
msgstr ""
|
| 256 |
|
| 257 |
-
#: includes/class-wc-customizer-settings.php:
|
| 258 |
msgid ""
|
| 259 |
"Changes the Excluding Taxes label. Defaults to Exc. tax for USA, Exc. VAT "
|
| 260 |
"for European countries"
|
| 261 |
msgstr ""
|
| 262 |
|
| 263 |
-
#: includes/class-wc-customizer-settings.php:
|
| 264 |
msgid "Images"
|
| 265 |
msgstr ""
|
| 266 |
|
| 267 |
-
#: includes/class-wc-customizer-settings.php:
|
| 268 |
msgid "Placeholder Image source"
|
| 269 |
msgstr ""
|
| 270 |
|
| 271 |
-
#: includes/class-wc-customizer-settings.php:
|
| 272 |
msgid "Change the default placeholder image by setting this to a valid image URL"
|
| 273 |
msgstr ""
|
| 274 |
|
| 275 |
-
#: woocommerce-customizer.php:
|
| 276 |
-
#. translators: %1$s and %2$s are <strong> tags. %3$s and %4$s are <a> tags
|
| 277 |
-
msgid ""
|
| 278 |
-
"%1$sWooCommerce Customizer is inactive.%2$s This version requires "
|
| 279 |
-
"WooCommerce 2.5.5 or newer. Please %3$supdate WooCommerce to version 2.5.5 "
|
| 280 |
-
"or newer%4$s"
|
| 281 |
-
msgstr ""
|
| 282 |
-
|
| 283 |
-
#: woocommerce-customizer.php:68
|
| 284 |
-
#. translators: %1$s and %2$s are <strong> tags. %3$s and %4$s are <a> tags
|
| 285 |
-
msgid ""
|
| 286 |
-
"%1$sWooCommerce Customizer is inactive%2$s as it requires WooCommerce. "
|
| 287 |
-
"Please %3$sactivate WooCommerce version 2.5.5 or newer%4$s"
|
| 288 |
-
msgstr ""
|
| 289 |
-
|
| 290 |
-
#: woocommerce-customizer.php:161
|
| 291 |
#. translators: Placeholders: %s - plugin name
|
| 292 |
msgid "You cannot clone instances of %s."
|
| 293 |
msgstr ""
|
| 294 |
|
| 295 |
-
#: woocommerce-customizer.php:
|
| 296 |
#. translators: Placeholders: %s - plugin name
|
| 297 |
msgid "You cannot unserialize instances of %s."
|
| 298 |
msgstr ""
|
| 299 |
|
| 300 |
-
#: woocommerce-customizer.php:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 301 |
msgid "Configure"
|
| 302 |
msgstr ""
|
| 303 |
|
| 304 |
-
#: woocommerce-customizer.php:
|
| 305 |
msgid "FAQ"
|
| 306 |
msgstr ""
|
| 307 |
|
| 308 |
-
#: woocommerce-customizer.php:
|
| 309 |
msgid "Support"
|
| 310 |
msgstr ""
|
| 311 |
|
| 312 |
-
#: woocommerce-customizer.php:
|
| 313 |
#. translators: Placeholder: %s - sale percentage
|
| 314 |
msgid "up to %s"
|
| 315 |
msgstr ""
|
| 1 |
+
# Copyright (C) 2018 SkyVerge
|
| 2 |
# This file is distributed under the GNU General Public License v3.0.
|
| 3 |
msgid ""
|
| 4 |
msgstr ""
|
| 5 |
+
"Project-Id-Version: WooCommerce Customizer 2.6.0\n"
|
| 6 |
"Report-Msgid-Bugs-To: "
|
| 7 |
+
"https://woocommerce.com/my-account/marketplace-ticket-form/\n"
|
| 8 |
+
"POT-Creation-Date: 2018-07-18 00:13:32+00:00\n"
|
| 9 |
"MIME-Version: 1.0\n"
|
| 10 |
"Content-Type: text/plain; charset=utf-8\n"
|
| 11 |
"Content-Transfer-Encoding: 8bit\n"
|
| 12 |
+
"PO-Revision-Date: 2018-MO-DA HO:MI+ZONE\n"
|
| 13 |
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
| 14 |
"Language-Team: LANGUAGE <LL@li.org>\n"
|
| 15 |
|
| 16 |
+
#: includes/class-wc-customizer-integrations.php:77
|
| 17 |
+
msgid "Bundle Product"
|
| 18 |
+
msgstr ""
|
| 19 |
+
|
| 20 |
+
#: includes/class-wc-customizer-integrations.php:78
|
| 21 |
+
msgid "Changes the add to cart button text for bundle products on all loop pages"
|
| 22 |
+
msgstr ""
|
| 23 |
+
|
| 24 |
#: includes/class-wc-customizer-settings.php:45
|
| 25 |
msgid "Customizer"
|
| 26 |
msgstr ""
|
| 38 |
msgstr ""
|
| 39 |
|
| 40 |
#: includes/class-wc-customizer-settings.php:65
|
| 41 |
+
#: includes/class-wc-customizer-settings.php:361
|
| 42 |
msgid "Misc"
|
| 43 |
msgstr ""
|
| 44 |
|
| 45 |
+
#: includes/class-wc-customizer-settings.php:149
|
| 46 |
+
#: includes/class-wc-customizer-settings.php:276
|
| 47 |
msgid "Add to Cart Button Text"
|
| 48 |
msgstr ""
|
| 49 |
|
| 50 |
+
#: includes/class-wc-customizer-settings.php:155
|
| 51 |
msgid "Simple Product"
|
| 52 |
msgstr ""
|
| 53 |
|
| 54 |
+
#: includes/class-wc-customizer-settings.php:156
|
| 55 |
msgid "Changes the add to cart button text for simple products on all loop pages"
|
| 56 |
msgstr ""
|
| 57 |
|
| 58 |
+
#: includes/class-wc-customizer-settings.php:162
|
| 59 |
msgid "Variable Product"
|
| 60 |
msgstr ""
|
| 61 |
|
| 62 |
+
#: includes/class-wc-customizer-settings.php:163
|
| 63 |
msgid "Changes the add to cart button text for variable products on all loop pages"
|
| 64 |
msgstr ""
|
| 65 |
|
| 66 |
+
#: includes/class-wc-customizer-settings.php:169
|
| 67 |
msgid "Grouped Product"
|
| 68 |
msgstr ""
|
| 69 |
|
| 70 |
+
#: includes/class-wc-customizer-settings.php:170
|
| 71 |
msgid "Changes the add to cart button text for grouped products on all loop pages"
|
| 72 |
msgstr ""
|
| 73 |
|
| 74 |
+
#: includes/class-wc-customizer-settings.php:176
|
| 75 |
msgid "Out of Stock Product"
|
| 76 |
msgstr ""
|
| 77 |
|
| 78 |
+
#: includes/class-wc-customizer-settings.php:177
|
| 79 |
msgid ""
|
| 80 |
"Changes the add to cart button text for out of stock products on all loop "
|
| 81 |
"pages"
|
| 82 |
msgstr ""
|
| 83 |
|
| 84 |
+
#: includes/class-wc-customizer-settings.php:184
|
| 85 |
+
#: includes/class-wc-customizer-settings.php:311
|
| 86 |
msgid "Sale Flash"
|
| 87 |
msgstr ""
|
| 88 |
|
| 89 |
+
#: includes/class-wc-customizer-settings.php:190
|
| 90 |
+
#: includes/class-wc-customizer-settings.php:317
|
| 91 |
msgid "Sale badge text"
|
| 92 |
msgstr ""
|
| 93 |
|
| 94 |
+
#: includes/class-wc-customizer-settings.php:191
|
| 95 |
msgid "Changes text for the sale flash on all loop pages. Default: \"Sale!\""
|
| 96 |
msgstr ""
|
| 97 |
|
| 98 |
+
#: includes/class-wc-customizer-settings.php:194
|
| 99 |
+
#: includes/class-wc-customizer-settings.php:321
|
| 100 |
#. translators: Placeholders: %1$s - <code>, %2$s - </code>
|
| 101 |
msgid "Use %1$s{percent}%2$s to insert percent off, e.g., \"{percent} off!\""
|
| 102 |
msgstr ""
|
| 103 |
|
| 104 |
+
#: includes/class-wc-customizer-settings.php:194
|
| 105 |
+
#: includes/class-wc-customizer-settings.php:321
|
| 106 |
msgid ""
|
| 107 |
"Shows \"up to n%\" for grouped or variable products if multiple percentages "
|
| 108 |
"are possible."
|
| 109 |
msgstr ""
|
| 110 |
|
| 111 |
+
#: includes/class-wc-customizer-settings.php:200
|
| 112 |
msgid "Layout"
|
| 113 |
msgstr ""
|
| 114 |
|
| 115 |
+
#: includes/class-wc-customizer-settings.php:206
|
| 116 |
msgid "Products displayed per page"
|
| 117 |
msgstr ""
|
| 118 |
|
| 119 |
+
#: includes/class-wc-customizer-settings.php:207
|
| 120 |
msgid "Changes the number of products displayed per page"
|
| 121 |
msgstr ""
|
| 122 |
|
| 123 |
+
#: includes/class-wc-customizer-settings.php:213
|
| 124 |
msgid "Product columns displayed per page"
|
| 125 |
msgstr ""
|
| 126 |
|
| 127 |
+
#: includes/class-wc-customizer-settings.php:214
|
| 128 |
msgid "Changes the number of columns displayed per page"
|
| 129 |
msgstr ""
|
| 130 |
|
| 131 |
+
#: includes/class-wc-customizer-settings.php:220
|
| 132 |
msgid "Product thumbnail columns displayed"
|
| 133 |
msgstr ""
|
| 134 |
|
| 135 |
+
#: includes/class-wc-customizer-settings.php:221
|
| 136 |
msgid "Changes the number of product thumbnail columns displayed"
|
| 137 |
msgstr ""
|
| 138 |
|
| 139 |
+
#: includes/class-wc-customizer-settings.php:234
|
| 140 |
msgid "Tab Titles"
|
| 141 |
msgstr ""
|
| 142 |
|
| 143 |
+
#: includes/class-wc-customizer-settings.php:240
|
| 144 |
+
#: includes/class-wc-customizer-settings.php:261
|
| 145 |
msgid "Product Description"
|
| 146 |
msgstr ""
|
| 147 |
|
| 148 |
+
#: includes/class-wc-customizer-settings.php:241
|
| 149 |
msgid "Changes the Production Description tab title"
|
| 150 |
msgstr ""
|
| 151 |
|
| 152 |
+
#: includes/class-wc-customizer-settings.php:247
|
| 153 |
+
#: includes/class-wc-customizer-settings.php:268
|
| 154 |
msgid "Additional Information"
|
| 155 |
msgstr ""
|
| 156 |
|
| 157 |
+
#: includes/class-wc-customizer-settings.php:248
|
| 158 |
msgid "Changes the Additional Information tab title"
|
| 159 |
msgstr ""
|
| 160 |
|
| 161 |
+
#: includes/class-wc-customizer-settings.php:255
|
| 162 |
msgid "Tab Content Headings"
|
| 163 |
msgstr ""
|
| 164 |
|
| 165 |
+
#: includes/class-wc-customizer-settings.php:262
|
| 166 |
msgid "Changes the Product Description tab heading"
|
| 167 |
msgstr ""
|
| 168 |
|
| 169 |
+
#: includes/class-wc-customizer-settings.php:269
|
| 170 |
msgid "Changes the Additional Information tab heading"
|
| 171 |
msgstr ""
|
| 172 |
|
| 173 |
+
#: includes/class-wc-customizer-settings.php:282
|
| 174 |
msgid "All Product Types"
|
| 175 |
msgstr ""
|
| 176 |
|
| 177 |
+
#: includes/class-wc-customizer-settings.php:283
|
| 178 |
msgid ""
|
| 179 |
"Changes the Add to Cart button text on the single product page for all "
|
| 180 |
"product type"
|
| 181 |
msgstr ""
|
| 182 |
|
| 183 |
+
#: includes/class-wc-customizer-settings.php:290
|
| 184 |
+
msgid "Out of Stock Text"
|
| 185 |
+
msgstr ""
|
| 186 |
+
|
| 187 |
#: includes/class-wc-customizer-settings.php:296
|
| 188 |
+
msgid "Out of Stock text"
|
| 189 |
+
msgstr ""
|
| 190 |
+
|
| 191 |
+
#: includes/class-wc-customizer-settings.php:297
|
| 192 |
+
msgid "Changes text for the out of stock on product pages. Default: \"Out of stock\""
|
| 193 |
+
msgstr ""
|
| 194 |
+
|
| 195 |
+
#: includes/class-wc-customizer-settings.php:303
|
| 196 |
+
msgid "Backorder text"
|
| 197 |
+
msgstr ""
|
| 198 |
+
|
| 199 |
+
#: includes/class-wc-customizer-settings.php:304
|
| 200 |
+
msgid ""
|
| 201 |
+
"Changes text for the backorder on product pages. Default: \"Available on "
|
| 202 |
+
"backorder\""
|
| 203 |
+
msgstr ""
|
| 204 |
+
|
| 205 |
+
#: includes/class-wc-customizer-settings.php:318
|
| 206 |
msgid "Changes text for the sale flash on product pages. Default: \"Sale!\""
|
| 207 |
msgstr ""
|
| 208 |
|
| 209 |
+
#: includes/class-wc-customizer-settings.php:332
|
| 210 |
msgid "Messages"
|
| 211 |
msgstr ""
|
| 212 |
|
| 213 |
+
#: includes/class-wc-customizer-settings.php:338
|
| 214 |
msgid "Must be logged in text"
|
| 215 |
msgstr ""
|
| 216 |
|
| 217 |
+
#: includes/class-wc-customizer-settings.php:339
|
| 218 |
msgid "Changes the message displayed when a customer must be logged in to checkout"
|
| 219 |
msgstr ""
|
| 220 |
|
| 221 |
+
#: includes/class-wc-customizer-settings.php:345
|
| 222 |
msgid "Coupon text"
|
| 223 |
msgstr ""
|
| 224 |
|
| 225 |
+
#: includes/class-wc-customizer-settings.php:346
|
| 226 |
msgid "Changes the message displayed if the coupon form is enabled on checkout"
|
| 227 |
msgstr ""
|
| 228 |
|
| 229 |
+
#: includes/class-wc-customizer-settings.php:353
|
| 230 |
msgid "Login text"
|
| 231 |
msgstr ""
|
| 232 |
|
| 233 |
+
#: includes/class-wc-customizer-settings.php:354
|
| 234 |
msgid "Changes the message displayed if customers can login at checkout"
|
| 235 |
msgstr ""
|
| 236 |
|
| 237 |
+
#: includes/class-wc-customizer-settings.php:367
|
| 238 |
msgid "Create Account checkbox default"
|
| 239 |
msgstr ""
|
| 240 |
|
| 241 |
+
#: includes/class-wc-customizer-settings.php:368
|
| 242 |
msgid "Control the default state for the Create Account checkbox"
|
| 243 |
msgstr ""
|
| 244 |
|
| 245 |
+
#: includes/class-wc-customizer-settings.php:371
|
| 246 |
msgid "Checked"
|
| 247 |
msgstr ""
|
| 248 |
|
| 249 |
+
#: includes/class-wc-customizer-settings.php:372
|
| 250 |
msgid "Unchecked"
|
| 251 |
msgstr ""
|
| 252 |
|
| 253 |
+
#: includes/class-wc-customizer-settings.php:379
|
| 254 |
msgid "Submit Order button"
|
| 255 |
msgstr ""
|
| 256 |
|
| 257 |
+
#: includes/class-wc-customizer-settings.php:380
|
| 258 |
msgid "Changes the Place Order button text on checkout"
|
| 259 |
msgstr ""
|
| 260 |
|
| 261 |
+
#: includes/class-wc-customizer-settings.php:393
|
| 262 |
msgid "Tax"
|
| 263 |
msgstr ""
|
| 264 |
|
| 265 |
+
#: includes/class-wc-customizer-settings.php:399
|
| 266 |
msgid "Tax Label"
|
| 267 |
msgstr ""
|
| 268 |
|
| 269 |
+
#: includes/class-wc-customizer-settings.php:400
|
| 270 |
msgid "Changes the Taxes label. Defaults to Tax for USA, VAT for European countries"
|
| 271 |
msgstr ""
|
| 272 |
|
| 273 |
+
#: includes/class-wc-customizer-settings.php:406
|
| 274 |
msgid "Including Tax Label"
|
| 275 |
msgstr ""
|
| 276 |
|
| 277 |
+
#: includes/class-wc-customizer-settings.php:407
|
| 278 |
msgid ""
|
| 279 |
"Changes the Including Taxes label. Defaults to Inc. tax for USA, Inc. VAT "
|
| 280 |
"for European countries"
|
| 281 |
msgstr ""
|
| 282 |
|
| 283 |
+
#: includes/class-wc-customizer-settings.php:413
|
| 284 |
msgid "Excluding Tax Label"
|
| 285 |
msgstr ""
|
| 286 |
|
| 287 |
+
#: includes/class-wc-customizer-settings.php:414
|
| 288 |
msgid ""
|
| 289 |
"Changes the Excluding Taxes label. Defaults to Exc. tax for USA, Exc. VAT "
|
| 290 |
"for European countries"
|
| 291 |
msgstr ""
|
| 292 |
|
| 293 |
+
#: includes/class-wc-customizer-settings.php:421
|
| 294 |
msgid "Images"
|
| 295 |
msgstr ""
|
| 296 |
|
| 297 |
+
#: includes/class-wc-customizer-settings.php:427
|
| 298 |
msgid "Placeholder Image source"
|
| 299 |
msgstr ""
|
| 300 |
|
| 301 |
+
#: includes/class-wc-customizer-settings.php:428
|
| 302 |
msgid "Change the default placeholder image by setting this to a valid image URL"
|
| 303 |
msgstr ""
|
| 304 |
|
| 305 |
+
#: woocommerce-customizer.php:132
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 306 |
#. translators: Placeholders: %s - plugin name
|
| 307 |
msgid "You cannot clone instances of %s."
|
| 308 |
msgstr ""
|
| 309 |
|
| 310 |
+
#: woocommerce-customizer.php:144
|
| 311 |
#. translators: Placeholders: %s - plugin name
|
| 312 |
msgid "You cannot unserialize instances of %s."
|
| 313 |
msgstr ""
|
| 314 |
|
| 315 |
+
#: woocommerce-customizer.php:303
|
| 316 |
+
#. translators: %1$s - <strong>, %2$s - </strong>, %3$s - <a>, %4$s - version
|
| 317 |
+
#. number, %5$s - </a>
|
| 318 |
+
msgid ""
|
| 319 |
+
"%1$sWooCommerce Customizer is inactive%2$s as it requires WooCommerce. "
|
| 320 |
+
"Please %3$sactivate WooCommerce version %4$s or newer%5$s"
|
| 321 |
+
msgstr ""
|
| 322 |
+
|
| 323 |
+
#: woocommerce-customizer.php:324
|
| 324 |
+
#. translators: Placeholders: %1$s - <strong>, %2$s - </strong>, %3$s - version
|
| 325 |
+
#. number, %4$s and %6$s - <a> tags, %5$s - </a>
|
| 326 |
+
msgid ""
|
| 327 |
+
"%1$sWooCommerce Customizer is inactive.%2$s This plugin requires "
|
| 328 |
+
"WooCommerce %3$s or newer. Please %4$supdate WooCommerce%5$s or %6$srun the "
|
| 329 |
+
"WooCommerce database upgrade%5$s."
|
| 330 |
+
msgstr ""
|
| 331 |
+
|
| 332 |
+
#: woocommerce-customizer.php:509
|
| 333 |
msgid "Configure"
|
| 334 |
msgstr ""
|
| 335 |
|
| 336 |
+
#: woocommerce-customizer.php:510
|
| 337 |
msgid "FAQ"
|
| 338 |
msgstr ""
|
| 339 |
|
| 340 |
+
#: woocommerce-customizer.php:511
|
| 341 |
msgid "Support"
|
| 342 |
msgstr ""
|
| 343 |
|
| 344 |
+
#: woocommerce-customizer.php:556
|
| 345 |
#. translators: Placeholder: %s - sale percentage
|
| 346 |
msgid "up to %s"
|
| 347 |
msgstr ""
|
includes/class-wc-customizer-integrations.php
ADDED
|
@@ -0,0 +1,110 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<?php
|
| 2 |
+
/**
|
| 3 |
+
* WooCommerce Customizer
|
| 4 |
+
*
|
| 5 |
+
* This source file is subject to the GNU General Public License v3.0
|
| 6 |
+
* that is bundled with this package in the file license.txt.
|
| 7 |
+
* It is also available through the world-wide-web at this URL:
|
| 8 |
+
* http://www.gnu.org/licenses/gpl-3.0.html
|
| 9 |
+
* If you did not receive a copy of the license and are unable to
|
| 10 |
+
* obtain it through the world-wide-web, please send an email
|
| 11 |
+
* to license@skyverge.com so we can send you a copy immediately.
|
| 12 |
+
*
|
| 13 |
+
* DISCLAIMER
|
| 14 |
+
*
|
| 15 |
+
* Do not edit or add to this file if you wish to upgrade WooCommerce Customizer to newer
|
| 16 |
+
* versions in the future. If you wish to customize WooCommerce Customizer for your
|
| 17 |
+
* needs please refer to http://www.skyverge.com/product/woocommerce-customizer/ for more information.
|
| 18 |
+
*
|
| 19 |
+
* @package WC-Customizer/Classes
|
| 20 |
+
* @author SkyVerge
|
| 21 |
+
* @copyright Copyright (c) 2013-2018, SkyVerge, Inc.
|
| 22 |
+
* @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License v3.0
|
| 23 |
+
*/
|
| 24 |
+
|
| 25 |
+
defined( 'ABSPATH' ) or exit;
|
| 26 |
+
|
| 27 |
+
/**
|
| 28 |
+
* Class WC_Customizer_Integrations.
|
| 29 |
+
*
|
| 30 |
+
* Adds integration code for other WooCommerce extensions.
|
| 31 |
+
*
|
| 32 |
+
* @since 2.6.0
|
| 33 |
+
*/
|
| 34 |
+
class WC_Customizer_Integrations {
|
| 35 |
+
|
| 36 |
+
|
| 37 |
+
/**
|
| 38 |
+
* WC_Customizer_Integrations constructor.
|
| 39 |
+
*
|
| 40 |
+
* @since 2.6.0
|
| 41 |
+
*/
|
| 42 |
+
public function __construct() {
|
| 43 |
+
|
| 44 |
+
if ( WC_Customizer::is_plugin_active( 'woocommerce-product-bundles.php' ) ) {
|
| 45 |
+
|
| 46 |
+
add_filter( 'wc_customizer_settings', array( $this, 'add_bundles_settings' ) );
|
| 47 |
+
add_filter( 'woocommerce_product_add_to_cart_text', array( $this, 'customize_bundle_add_to_cart_text' ), 150, 2 );
|
| 48 |
+
}
|
| 49 |
+
}
|
| 50 |
+
|
| 51 |
+
|
| 52 |
+
/**
|
| 53 |
+
* Adds settings when Product Bundles is active.
|
| 54 |
+
*
|
| 55 |
+
* @since 2.6.0
|
| 56 |
+
*
|
| 57 |
+
* @param array $settings the settings array
|
| 58 |
+
* @return array updated settings
|
| 59 |
+
*/
|
| 60 |
+
public function add_bundles_settings( $settings ) {
|
| 61 |
+
|
| 62 |
+
$new_settings = array();
|
| 63 |
+
|
| 64 |
+
foreach ( $settings as $section => $settings_group ) {
|
| 65 |
+
|
| 66 |
+
$new_settings[ $section ] = array();
|
| 67 |
+
|
| 68 |
+
foreach ( $settings_group as $setting ) {
|
| 69 |
+
|
| 70 |
+
$new_settings[ $section ][] = $setting;
|
| 71 |
+
|
| 72 |
+
if ( 'shop_loop' === $section && isset( $setting['id'] ) && 'grouped_add_to_cart_text' === $setting['id'] ) {
|
| 73 |
+
|
| 74 |
+
// insert bundle settings after the grouped product text
|
| 75 |
+
$new_settings[ $section ][] = array(
|
| 76 |
+
'id' => 'bundle_add_to_cart_text',
|
| 77 |
+
'title' => __( 'Bundle Product', 'woocommerce-customizer' ),
|
| 78 |
+
'desc_tip' => __( 'Changes the add to cart button text for bundle products on all loop pages', 'woocommerce-customizer' ),
|
| 79 |
+
'type' => 'text'
|
| 80 |
+
);
|
| 81 |
+
}
|
| 82 |
+
}
|
| 83 |
+
}
|
| 84 |
+
|
| 85 |
+
return $new_settings;
|
| 86 |
+
}
|
| 87 |
+
|
| 88 |
+
|
| 89 |
+
/**
|
| 90 |
+
* Customizes the add to cart button for bundle products.
|
| 91 |
+
*
|
| 92 |
+
* @since 2.6.0
|
| 93 |
+
*
|
| 94 |
+
* @param string $text add to cart text
|
| 95 |
+
* @param WC_Product $product product object
|
| 96 |
+
* @return string modified add to cart text
|
| 97 |
+
*/
|
| 98 |
+
public function customize_bundle_add_to_cart_text( $text, $product ) {
|
| 99 |
+
|
| 100 |
+
if ( isset( wc_customizer()->filters['bundle_add_to_cart_text'] ) && $product->is_type( 'bundle' ) ) {
|
| 101 |
+
|
| 102 |
+
// bundle add to cart text
|
| 103 |
+
$text = wc_customizer()->filters['bundle_add_to_cart_text'];
|
| 104 |
+
}
|
| 105 |
+
|
| 106 |
+
return $text;
|
| 107 |
+
}
|
| 108 |
+
|
| 109 |
+
|
| 110 |
+
}
|
includes/class-wc-customizer-settings.php
CHANGED
|
@@ -18,7 +18,7 @@
|
|
| 18 |
*
|
| 19 |
* @package WC-Customizer/Classes
|
| 20 |
* @author SkyVerge
|
| 21 |
-
* @copyright Copyright (c) 2013-
|
| 22 |
* @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License v3.0
|
| 23 |
*/
|
| 24 |
|
|
@@ -133,7 +133,8 @@ class WC_Customizer_Settings extends WC_Settings_Page {
|
|
| 133 |
/**
|
| 134 |
* Return admin fields in proper format for outputting / saving
|
| 135 |
*
|
| 136 |
-
* @since 1.1
|
|
|
|
| 137 |
* @return array
|
| 138 |
*/
|
| 139 |
public function get_settings() {
|
|
@@ -285,6 +286,27 @@ class WC_Customizer_Settings extends WC_Settings_Page {
|
|
| 285 |
|
| 286 |
array( 'type' => 'sectionend' ),
|
| 287 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 288 |
array(
|
| 289 |
'title' => __( 'Sale Flash', 'woocommerce-customizer' ),
|
| 290 |
'type' => 'title'
|
|
@@ -412,6 +434,15 @@ class WC_Customizer_Settings extends WC_Settings_Page {
|
|
| 412 |
),
|
| 413 |
);
|
| 414 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 415 |
$current_section = isset( $GLOBALS['current_section'] ) ? $GLOBALS['current_section'] : 'shop_loop';
|
| 416 |
|
| 417 |
return isset( $settings[ $current_section ] ) ? $settings[ $current_section ] : $settings['shop_loop'];
|
| 18 |
*
|
| 19 |
* @package WC-Customizer/Classes
|
| 20 |
* @author SkyVerge
|
| 21 |
+
* @copyright Copyright (c) 2013-2018, SkyVerge, Inc.
|
| 22 |
* @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License v3.0
|
| 23 |
*/
|
| 24 |
|
| 133 |
/**
|
| 134 |
* Return admin fields in proper format for outputting / saving
|
| 135 |
*
|
| 136 |
+
* @since 1.1.0
|
| 137 |
+
*
|
| 138 |
* @return array
|
| 139 |
*/
|
| 140 |
public function get_settings() {
|
| 286 |
|
| 287 |
array( 'type' => 'sectionend' ),
|
| 288 |
|
| 289 |
+
array(
|
| 290 |
+
'title' => __( 'Out of Stock Text', 'woocommerce-customizer' ),
|
| 291 |
+
'type' => 'title'
|
| 292 |
+
),
|
| 293 |
+
|
| 294 |
+
array(
|
| 295 |
+
'id' => 'single_out_of_stock_text',
|
| 296 |
+
'title' => __( 'Out of Stock text', 'woocommerce-customizer' ),
|
| 297 |
+
'desc_tip' => __( 'Changes text for the out of stock on product pages. Default: "Out of stock"', 'woocommerce-customizer' ),
|
| 298 |
+
'type' => 'text',
|
| 299 |
+
),
|
| 300 |
+
|
| 301 |
+
array(
|
| 302 |
+
'id' => 'single_backorder_text',
|
| 303 |
+
'title' => __( 'Backorder text', 'woocommerce-customizer' ),
|
| 304 |
+
'desc_tip' => __( 'Changes text for the backorder on product pages. Default: "Available on backorder"', 'woocommerce-customizer' ),
|
| 305 |
+
'type' => 'text',
|
| 306 |
+
),
|
| 307 |
+
|
| 308 |
+
array( 'type' => 'sectionend' ),
|
| 309 |
+
|
| 310 |
array(
|
| 311 |
'title' => __( 'Sale Flash', 'woocommerce-customizer' ),
|
| 312 |
'type' => 'title'
|
| 434 |
),
|
| 435 |
);
|
| 436 |
|
| 437 |
+
/**
|
| 438 |
+
* Filters the available customizer settings.
|
| 439 |
+
*
|
| 440 |
+
* @since 2.6.0
|
| 441 |
+
*
|
| 442 |
+
* @param array $settings the plugin settings
|
| 443 |
+
*/
|
| 444 |
+
$settings = apply_filters( 'wc_customizer_settings', $settings );
|
| 445 |
+
|
| 446 |
$current_section = isset( $GLOBALS['current_section'] ) ? $GLOBALS['current_section'] : 'shop_loop';
|
| 447 |
|
| 448 |
return isset( $settings[ $current_section ] ) ? $settings[ $current_section ] : $settings['shop_loop'];
|
readme.txt
CHANGED
|
@@ -3,10 +3,10 @@ Contributors: SkyVerge, maxrice, tamarazuk, chasewiseman, nekojira, beka.rice
|
|
| 3 |
Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_xclick&business=paypal@skyverge.com&item_name=Donation+for+WooCommerce+Customizer
|
| 4 |
Tags: woocommerce, woocommerce shop, woocommerce filters, woocommerce text
|
| 5 |
Requires at least: 4.1
|
| 6 |
-
Tested up to: 4.7
|
| 7 |
-
WC requires at least: 2.
|
| 8 |
-
WC tested up to: 3.
|
| 9 |
-
Stable tag: 2.
|
| 10 |
License: GPLv3 or later
|
| 11 |
License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
| 12 |
|
|
@@ -16,7 +16,7 @@ Helps you customize WooCommerce without writing any code!
|
|
| 16 |
|
| 17 |
WooCommerce includes tons of filters to let you customize button text, labels, and more, but you have to write PHP code to use them. This plugin provides a settings page where you can add your customizations and save them without needing to write any code or modify any templates, which is helpful for quick change testing.
|
| 18 |
|
| 19 |
-
> **Requires** WooCommerce 2.
|
| 20 |
|
| 21 |
Here are some customizations you can make:
|
| 22 |
|
|
@@ -73,6 +73,15 @@ Of course! Please fork the [GitHub](https://github.com/skyverge/woocommerce-cust
|
|
| 73 |
|
| 74 |
== Changelog ==
|
| 75 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 76 |
= 2.5.0 =
|
| 77 |
* Feature - Added sales badge text customization
|
| 78 |
|
| 3 |
Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_xclick&business=paypal@skyverge.com&item_name=Donation+for+WooCommerce+Customizer
|
| 4 |
Tags: woocommerce, woocommerce shop, woocommerce filters, woocommerce text
|
| 5 |
Requires at least: 4.1
|
| 6 |
+
Tested up to: 4.9.7
|
| 7 |
+
WC requires at least: 2.6.14
|
| 8 |
+
WC tested up to: 3.4.3
|
| 9 |
+
Stable tag: 2.6.0
|
| 10 |
License: GPLv3 or later
|
| 11 |
License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
| 12 |
|
| 16 |
|
| 17 |
WooCommerce includes tons of filters to let you customize button text, labels, and more, but you have to write PHP code to use them. This plugin provides a settings page where you can add your customizations and save them without needing to write any code or modify any templates, which is helpful for quick change testing.
|
| 18 |
|
| 19 |
+
> **Requires** WooCommerce 2.6.14+
|
| 20 |
|
| 21 |
Here are some customizations you can make:
|
| 22 |
|
| 73 |
|
| 74 |
== Changelog ==
|
| 75 |
|
| 76 |
+
= 2018.07.17 - version 2.6.0 =
|
| 77 |
+
* Feature - Added backorder text customization on product pages (props [@sandysaille](https://github.com/sandysaille)!)
|
| 78 |
+
* Feature - Added out of stock text customization on product pages (props [@sandysaille](https://github.com/sandysaille)!)
|
| 79 |
+
* Feature - Change bundle product add to cart text with WooCommerce Product Bundles (props [@DaisukiDaYo](https://github.com/DaisukiDaYo)!)
|
| 80 |
+
* Misc - Requires WooCommerce 2.6.14
|
| 81 |
+
|
| 82 |
+
= 2.5.1 =
|
| 83 |
+
* Tweak - Hook customizations later to be more aggressive about using WC Customizer values rather than filters from other plugins or themes
|
| 84 |
+
|
| 85 |
= 2.5.0 =
|
| 86 |
* Feature - Added sales badge text customization
|
| 87 |
|
woocommerce-customizer.php
CHANGED
|
@@ -5,11 +5,11 @@
|
|
| 5 |
* Description: Customize WooCommerce without code! Easily change add to cart button text and more.
|
| 6 |
* Author: SkyVerge
|
| 7 |
* Author URI: http://www.skyverge.com
|
| 8 |
-
* Version: 2.
|
| 9 |
* Text Domain: woocommerce-customizer
|
| 10 |
* Domain Path: /i18n/languages/
|
| 11 |
*
|
| 12 |
-
* Copyright: (c) 2013-
|
| 13 |
*
|
| 14 |
* License: GNU General Public License v3.0
|
| 15 |
* License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
|
@@ -17,65 +17,28 @@
|
|
| 17 |
* @package WC-Customizer
|
| 18 |
* @author SkyVerge
|
| 19 |
* @category Utility
|
| 20 |
-
* @copyright Copyright (c) 2013-
|
| 21 |
* @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License v3.0
|
|
|
|
|
|
|
|
|
|
| 22 |
*/
|
| 23 |
|
| 24 |
defined( 'ABSPATH' ) or exit;
|
| 25 |
|
| 26 |
// Check if WooCommerce is active
|
| 27 |
-
if ( ! WC_Customizer::
|
| 28 |
-
add_action( 'admin_notices', '
|
| 29 |
return;
|
| 30 |
}
|
| 31 |
|
| 32 |
// WC version check
|
| 33 |
-
if ( version_compare( get_option( 'woocommerce_db_version' ),
|
| 34 |
-
add_action( 'admin_notices', '
|
| 35 |
return;
|
| 36 |
}
|
| 37 |
|
| 38 |
|
| 39 |
-
/**
|
| 40 |
-
* Renders a notice when WooCommerce version is outdated
|
| 41 |
-
*
|
| 42 |
-
* @since 2.3.1
|
| 43 |
-
*/
|
| 44 |
-
function wc_customizer_render_outdated_wc_version_notice() {
|
| 45 |
-
|
| 46 |
-
$message = sprintf(
|
| 47 |
-
/* translators: %1$s and %2$s are <strong> tags. %3$s and %4$s are <a> tags */
|
| 48 |
-
__( '%1$sWooCommerce Customizer is inactive.%2$s This version requires WooCommerce 2.5.5 or newer. Please %3$supdate WooCommerce to version 2.5.5 or newer%4$s', 'woocommerce-customizer' ),
|
| 49 |
-
'<strong>',
|
| 50 |
-
'</strong>',
|
| 51 |
-
'<a href="' . admin_url( 'plugins.php' ) . '">',
|
| 52 |
-
' »</a>'
|
| 53 |
-
);
|
| 54 |
-
|
| 55 |
-
printf( '<div class="error"><p>%s</p></div>', $message );
|
| 56 |
-
}
|
| 57 |
-
|
| 58 |
-
|
| 59 |
-
/**
|
| 60 |
-
* Renders a notice when WooCommerce version is outdated
|
| 61 |
-
*
|
| 62 |
-
* @since 2.3.1
|
| 63 |
-
*/
|
| 64 |
-
function wc_customizer_render_wc_inactive_notice() {
|
| 65 |
-
|
| 66 |
-
$message = sprintf(
|
| 67 |
-
/* translators: %1$s and %2$s are <strong> tags. %3$s and %4$s are <a> tags */
|
| 68 |
-
__( '%1$sWooCommerce Customizer is inactive%2$s as it requires WooCommerce. Please %3$sactivate WooCommerce version 2.5.5 or newer%4$s', 'woocommerce-customizer' ),
|
| 69 |
-
'<strong>',
|
| 70 |
-
'</strong>',
|
| 71 |
-
'<a href="' . admin_url( 'plugins.php' ) . '">',
|
| 72 |
-
' »</a>'
|
| 73 |
-
);
|
| 74 |
-
|
| 75 |
-
printf( '<div class="error"><p>%s</p></div>', $message );
|
| 76 |
-
}
|
| 77 |
-
|
| 78 |
-
|
| 79 |
/**
|
| 80 |
* # WooCommerce Customizer Main Plugin Class
|
| 81 |
*
|
|
@@ -111,11 +74,17 @@ class WC_Customizer {
|
|
| 111 |
|
| 112 |
|
| 113 |
/** plugin version number */
|
| 114 |
-
const VERSION = '2.
|
|
|
|
|
|
|
|
|
|
| 115 |
|
| 116 |
/** @var \WC_Customizer single instance of this plugin */
|
| 117 |
protected static $instance;
|
| 118 |
|
|
|
|
|
|
|
|
|
|
| 119 |
/** @var \WC_Customizer_Settings instance */
|
| 120 |
public $settings;
|
| 121 |
|
|
@@ -146,6 +115,8 @@ class WC_Customizer {
|
|
| 146 |
$this->install();
|
| 147 |
}
|
| 148 |
|
|
|
|
|
|
|
| 149 |
add_action( 'woocommerce_init', array( $this, 'load_customizations' ) );
|
| 150 |
}
|
| 151 |
|
|
@@ -174,6 +145,17 @@ class WC_Customizer {
|
|
| 174 |
}
|
| 175 |
|
| 176 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 177 |
/**
|
| 178 |
* Add settings page
|
| 179 |
*
|
|
@@ -208,27 +190,35 @@ class WC_Customizer {
|
|
| 208 |
|
| 209 |
if ( $filter_name == 'single_add_to_cart_text' ) {
|
| 210 |
|
| 211 |
-
add_filter( 'woocommerce_product_single_add_to_cart_text', array( $this, 'customize_single_add_to_cart_text' ) );
|
| 212 |
|
| 213 |
} else {
|
| 214 |
|
| 215 |
-
add_filter( 'woocommerce_product_add_to_cart_text', array( $this, 'customize_add_to_cart_text' ),
|
| 216 |
}
|
| 217 |
|
| 218 |
} elseif ( 'woocommerce_placeholder_img_src' === $filter_name ) {
|
| 219 |
|
| 220 |
// only filter placeholder images on the frontend
|
| 221 |
if ( ! is_admin() ) {
|
| 222 |
-
add_filter( $filter_name, array( $this, 'customize' ) );
|
| 223 |
}
|
| 224 |
|
| 225 |
} elseif ( 'loop_sale_flash_text' === $filter_name || 'single_sale_flash_text' === $filter_name ) {
|
| 226 |
|
| 227 |
add_filter( 'woocommerce_sale_flash', array( $this, 'customize_woocommerce_sale_flash' ), 50, 3 );
|
| 228 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 229 |
} else {
|
| 230 |
|
| 231 |
-
add_filter( $filter_name, array( $this, 'customize' ) );
|
| 232 |
}
|
| 233 |
}
|
| 234 |
}
|
|
@@ -251,17 +241,96 @@ class WC_Customizer {
|
|
| 251 |
* Checks if WooCommerce is active
|
| 252 |
*
|
| 253 |
* @since 2.3.0
|
|
|
|
|
|
|
| 254 |
* @return bool true if WooCommerce is active, false otherwise
|
| 255 |
*/
|
| 256 |
public static function is_woocommerce_active() {
|
| 257 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 258 |
$active_plugins = (array) get_option( 'active_plugins', array() );
|
| 259 |
|
| 260 |
if ( is_multisite() ) {
|
| 261 |
-
$active_plugins = array_merge( $active_plugins, get_site_option( 'active_sitewide_plugins', array() ) );
|
| 262 |
}
|
| 263 |
|
| 264 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 265 |
}
|
| 266 |
|
| 267 |
|
|
@@ -337,10 +406,51 @@ class WC_Customizer {
|
|
| 337 |
// grouped add to cart text
|
| 338 |
return $this->filters['grouped_add_to_cart_text'];
|
| 339 |
|
| 340 |
-
} elseif( isset( $this->filters['external_add_to_cart_text'] ) && $product->is_type( 'external' ) ) {
|
| 341 |
|
| 342 |
// external add to cart text
|
| 343 |
return $this->filters['external_add_to_cart_text'];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 344 |
}
|
| 345 |
|
| 346 |
return $text;
|
|
@@ -359,36 +469,26 @@ class WC_Customizer {
|
|
| 359 |
*/
|
| 360 |
public function customize_woocommerce_sale_flash( $html, $_, $product ) {
|
| 361 |
|
|
|
|
|
|
|
| 362 |
if ( is_product() && isset( $this->filters['single_sale_flash_text'] ) ) {
|
| 363 |
|
| 364 |
$text = $this->filters['single_sale_flash_text'];
|
| 365 |
|
| 366 |
-
// only get sales percentages when we should be replacing text
|
| 367 |
-
// check "false" specifically since the position could be 0
|
| 368 |
-
if ( false !== strpos( $text, '{percent}' ) ) {
|
| 369 |
-
|
| 370 |
-
$percent = $this->get_sale_percentage( $product );
|
| 371 |
-
$text = str_replace( '{percent}', "{$percent}%", $text );
|
| 372 |
-
}
|
| 373 |
-
|
| 374 |
-
$html = "<span class='onsale'>{$text}</span>";
|
| 375 |
-
|
| 376 |
} elseif ( ! is_product() && isset( $this->filters['loop_sale_flash_text'] ) ) {
|
| 377 |
|
| 378 |
$text = $this->filters['loop_sale_flash_text'];
|
|
|
|
| 379 |
|
| 380 |
-
|
| 381 |
-
|
| 382 |
-
|
| 383 |
-
|
| 384 |
-
$percent = $this->get_sale_percentage( $product );
|
| 385 |
-
$text = str_replace( '{percent}', "{$percent}%", $text );
|
| 386 |
-
}
|
| 387 |
|
| 388 |
-
$
|
|
|
|
| 389 |
}
|
| 390 |
|
| 391 |
-
return $html;
|
| 392 |
}
|
| 393 |
|
| 394 |
|
|
@@ -504,6 +604,18 @@ class WC_Customizer {
|
|
| 504 |
}
|
| 505 |
|
| 506 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 507 |
/** Lifecycle methods ******************************************************/
|
| 508 |
|
| 509 |
|
| 5 |
* Description: Customize WooCommerce without code! Easily change add to cart button text and more.
|
| 6 |
* Author: SkyVerge
|
| 7 |
* Author URI: http://www.skyverge.com
|
| 8 |
+
* Version: 2.6.0
|
| 9 |
* Text Domain: woocommerce-customizer
|
| 10 |
* Domain Path: /i18n/languages/
|
| 11 |
*
|
| 12 |
+
* Copyright: (c) 2013-2018, SkyVerge, Inc. (info@skyverge.com)
|
| 13 |
*
|
| 14 |
* License: GNU General Public License v3.0
|
| 15 |
* License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
| 17 |
* @package WC-Customizer
|
| 18 |
* @author SkyVerge
|
| 19 |
* @category Utility
|
| 20 |
+
* @copyright Copyright (c) 2013-2018, SkyVerge, Inc.
|
| 21 |
* @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License v3.0
|
| 22 |
+
*
|
| 23 |
+
* WC requires at least: 2.6.14
|
| 24 |
+
* WC tested up to: 3.4.3
|
| 25 |
*/
|
| 26 |
|
| 27 |
defined( 'ABSPATH' ) or exit;
|
| 28 |
|
| 29 |
// Check if WooCommerce is active
|
| 30 |
+
if ( ! WC_Customizer::is_plugin_active( 'woocommerce.php' ) ) {
|
| 31 |
+
add_action( 'admin_notices', array( 'WC_Customizer', 'render_wc_inactive_notice' ) );
|
| 32 |
return;
|
| 33 |
}
|
| 34 |
|
| 35 |
// WC version check
|
| 36 |
+
if ( version_compare( get_option( 'woocommerce_db_version' ), WC_Customizer::MIN_WOOCOMMERCE_VERSION, '<' ) ) {
|
| 37 |
+
add_action( 'admin_notices', array( 'WC_Customizer', 'render_outdated_wc_version_notice' ) );
|
| 38 |
return;
|
| 39 |
}
|
| 40 |
|
| 41 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 42 |
/**
|
| 43 |
* # WooCommerce Customizer Main Plugin Class
|
| 44 |
*
|
| 74 |
|
| 75 |
|
| 76 |
/** plugin version number */
|
| 77 |
+
const VERSION = '2.6.0';
|
| 78 |
+
|
| 79 |
+
/** required WooCommerce version number */
|
| 80 |
+
const MIN_WOOCOMMERCE_VERSION = '2.6.14';
|
| 81 |
|
| 82 |
/** @var \WC_Customizer single instance of this plugin */
|
| 83 |
protected static $instance;
|
| 84 |
|
| 85 |
+
/** @var \WC_Customizer_Integrations integrations class instance */
|
| 86 |
+
protected $integrations;
|
| 87 |
+
|
| 88 |
/** @var \WC_Customizer_Settings instance */
|
| 89 |
public $settings;
|
| 90 |
|
| 115 |
$this->install();
|
| 116 |
}
|
| 117 |
|
| 118 |
+
$this->includes();
|
| 119 |
+
|
| 120 |
add_action( 'woocommerce_init', array( $this, 'load_customizations' ) );
|
| 121 |
}
|
| 122 |
|
| 145 |
}
|
| 146 |
|
| 147 |
|
| 148 |
+
/**
|
| 149 |
+
* Loads required filed.
|
| 150 |
+
*
|
| 151 |
+
* @since 2.6.0
|
| 152 |
+
*/
|
| 153 |
+
protected function includes() {
|
| 154 |
+
require_once( 'includes/class-wc-customizer-integrations.php' );
|
| 155 |
+
$this->integrations = new WC_Customizer_Integrations();
|
| 156 |
+
}
|
| 157 |
+
|
| 158 |
+
|
| 159 |
/**
|
| 160 |
* Add settings page
|
| 161 |
*
|
| 190 |
|
| 191 |
if ( $filter_name == 'single_add_to_cart_text' ) {
|
| 192 |
|
| 193 |
+
add_filter( 'woocommerce_product_single_add_to_cart_text', array( $this, 'customize_single_add_to_cart_text' ), 50 );
|
| 194 |
|
| 195 |
} else {
|
| 196 |
|
| 197 |
+
add_filter( 'woocommerce_product_add_to_cart_text', array( $this, 'customize_add_to_cart_text' ), 50, 2 );
|
| 198 |
}
|
| 199 |
|
| 200 |
} elseif ( 'woocommerce_placeholder_img_src' === $filter_name ) {
|
| 201 |
|
| 202 |
// only filter placeholder images on the frontend
|
| 203 |
if ( ! is_admin() ) {
|
| 204 |
+
add_filter( $filter_name, array( $this, 'customize' ), 50 );
|
| 205 |
}
|
| 206 |
|
| 207 |
} elseif ( 'loop_sale_flash_text' === $filter_name || 'single_sale_flash_text' === $filter_name ) {
|
| 208 |
|
| 209 |
add_filter( 'woocommerce_sale_flash', array( $this, 'customize_woocommerce_sale_flash' ), 50, 3 );
|
| 210 |
|
| 211 |
+
} elseif ( 'single_out_of_stock_text' === $filter_name ) {
|
| 212 |
+
|
| 213 |
+
add_filter( 'woocommerce_get_availability_text', array( $this, 'customize_single_out_of_stock_text' ), 50, 2 );
|
| 214 |
+
|
| 215 |
+
} elseif ( 'single_backorder_text' === $filter_name ) {
|
| 216 |
+
|
| 217 |
+
add_filter( 'woocommerce_get_availability_text', array( $this, 'customize_single_backorder_text' ), 50, 2 );
|
| 218 |
+
|
| 219 |
} else {
|
| 220 |
|
| 221 |
+
add_filter( $filter_name, array( $this, 'customize' ), 50 );
|
| 222 |
}
|
| 223 |
}
|
| 224 |
}
|
| 241 |
* Checks if WooCommerce is active
|
| 242 |
*
|
| 243 |
* @since 2.3.0
|
| 244 |
+
* @deprecated 2.6.0
|
| 245 |
+
*
|
| 246 |
* @return bool true if WooCommerce is active, false otherwise
|
| 247 |
*/
|
| 248 |
public static function is_woocommerce_active() {
|
| 249 |
|
| 250 |
+
_deprecated_function( 'WC_Customizer::is_woocommerce_active', '2.6.0', 'WC_Customizer::is_plugin_active' );
|
| 251 |
+
|
| 252 |
+
return self::is_plugin_active( 'woocommerce.php' );
|
| 253 |
+
}
|
| 254 |
+
|
| 255 |
+
|
| 256 |
+
/**
|
| 257 |
+
* Helper function to determine whether a plugin is active.
|
| 258 |
+
*
|
| 259 |
+
* @since 2.6.0
|
| 260 |
+
*
|
| 261 |
+
* @param string $plugin_name plugin name, as the plugin-filename.php
|
| 262 |
+
* @return boolean true if the named plugin is installed and active
|
| 263 |
+
*/
|
| 264 |
+
public static function is_plugin_active( $plugin_name ) {
|
| 265 |
+
|
| 266 |
$active_plugins = (array) get_option( 'active_plugins', array() );
|
| 267 |
|
| 268 |
if ( is_multisite() ) {
|
| 269 |
+
$active_plugins = array_merge( $active_plugins, array_keys( get_site_option( 'active_sitewide_plugins', array() ) ) );
|
| 270 |
}
|
| 271 |
|
| 272 |
+
$plugin_filenames = array();
|
| 273 |
+
|
| 274 |
+
foreach ( $active_plugins as $plugin ) {
|
| 275 |
+
|
| 276 |
+
if ( false !== strpos( $plugin, '/' ) ) {
|
| 277 |
+
|
| 278 |
+
// normal plugin name (plugin-dir/plugin-filename.php)
|
| 279 |
+
list( , $filename ) = explode( '/', $plugin );
|
| 280 |
+
|
| 281 |
+
} else {
|
| 282 |
+
|
| 283 |
+
// no directory, just plugin file
|
| 284 |
+
$filename = $plugin;
|
| 285 |
+
}
|
| 286 |
+
|
| 287 |
+
$plugin_filenames[] = $filename;
|
| 288 |
+
}
|
| 289 |
+
|
| 290 |
+
return in_array( $plugin_name, $plugin_filenames );
|
| 291 |
+
}
|
| 292 |
+
|
| 293 |
+
|
| 294 |
+
/**
|
| 295 |
+
* Renders a notice when WooCommerce version is outdated
|
| 296 |
+
*
|
| 297 |
+
* @since 2.3.1
|
| 298 |
+
*/
|
| 299 |
+
public static function render_wc_inactive_notice() {
|
| 300 |
+
|
| 301 |
+
$message = sprintf(
|
| 302 |
+
/* translators: %1$s - <strong>, %2$s - </strong>, %3$s - <a>, %4$s - version number, %5$s - </a> */
|
| 303 |
+
__( '%1$sWooCommerce Customizer is inactive%2$s as it requires WooCommerce. Please %3$sactivate WooCommerce version %4$s or newer%5$s', 'woocommerce-customizer' ),
|
| 304 |
+
'<strong>',
|
| 305 |
+
'</strong>',
|
| 306 |
+
'<a href="' . admin_url( 'plugins.php' ) . '">',
|
| 307 |
+
self::MIN_WOOCOMMERCE_VERSION,
|
| 308 |
+
' »</a>'
|
| 309 |
+
);
|
| 310 |
+
|
| 311 |
+
printf( '<div class="error"><p>%s</p></div>', $message );
|
| 312 |
+
}
|
| 313 |
+
|
| 314 |
+
|
| 315 |
+
/**
|
| 316 |
+
* Renders a notice when WooCommerce version is outdated
|
| 317 |
+
*
|
| 318 |
+
* @since 2.3.1
|
| 319 |
+
*/
|
| 320 |
+
public static function render_outdated_wc_version_notice() {
|
| 321 |
+
|
| 322 |
+
$message = sprintf(
|
| 323 |
+
/* translators: Placeholders: %1$s - <strong>, %2$s - </strong>, %3$s - version number, %4$s and %6$s - <a> tags, %5$s - </a> */
|
| 324 |
+
__( '%1$sWooCommerce Customizer is inactive.%2$s This plugin requires WooCommerce %3$s or newer. Please %4$supdate WooCommerce%5$s or %6$srun the WooCommerce database upgrade%5$s.', 'woocommerce-customizer' ),
|
| 325 |
+
'<strong>',
|
| 326 |
+
'</strong>',
|
| 327 |
+
self::MIN_WOOCOMMERCE_VERSION,
|
| 328 |
+
'<a href="' . admin_url( 'plugins.php' ) . '">',
|
| 329 |
+
'</a>',
|
| 330 |
+
'<a href="' . admin_url( 'plugins.php?do_update_woocommerce=true' ) . '">'
|
| 331 |
+
);
|
| 332 |
+
|
| 333 |
+
printf( '<div class="error"><p>%s</p></div>', $message );
|
| 334 |
}
|
| 335 |
|
| 336 |
|
| 406 |
// grouped add to cart text
|
| 407 |
return $this->filters['grouped_add_to_cart_text'];
|
| 408 |
|
| 409 |
+
} elseif ( isset( $this->filters['external_add_to_cart_text'] ) && $product->is_type( 'external' ) ) {
|
| 410 |
|
| 411 |
// external add to cart text
|
| 412 |
return $this->filters['external_add_to_cart_text'];
|
| 413 |
+
|
| 414 |
+
}
|
| 415 |
+
|
| 416 |
+
return $text;
|
| 417 |
+
}
|
| 418 |
+
|
| 419 |
+
|
| 420 |
+
/**
|
| 421 |
+
* Apply the product page out of stock text customization
|
| 422 |
+
*
|
| 423 |
+
* @since 2.6.0
|
| 424 |
+
*
|
| 425 |
+
* @param string $text out of stock text
|
| 426 |
+
* @param \WC_Product $product product object
|
| 427 |
+
* @return string modified out of stock text
|
| 428 |
+
*/
|
| 429 |
+
public function customize_single_out_of_stock_text( $text, $product ) {
|
| 430 |
+
|
| 431 |
+
// out of stock text
|
| 432 |
+
if ( isset( $this->filters['single_out_of_stock_text'] ) && ! $product->is_in_stock() ) {
|
| 433 |
+
return $this->filters['single_out_of_stock_text'];
|
| 434 |
+
}
|
| 435 |
+
|
| 436 |
+
return $text;
|
| 437 |
+
}
|
| 438 |
+
|
| 439 |
+
|
| 440 |
+
/**
|
| 441 |
+
* Apply the product page backorder text customization
|
| 442 |
+
*
|
| 443 |
+
* @since 2.6.0
|
| 444 |
+
*
|
| 445 |
+
* @param string $text backorder text
|
| 446 |
+
* @param \WC_Product $product product object
|
| 447 |
+
* @return string modified backorder text
|
| 448 |
+
*/
|
| 449 |
+
public function customize_single_backorder_text( $text, $product ) {
|
| 450 |
+
|
| 451 |
+
// backorder text
|
| 452 |
+
if ( isset( $this->filters['single_backorder_text'] ) && $product->managing_stock() && $product->is_on_backorder( 1 ) ) {
|
| 453 |
+
return $this->filters['single_backorder_text'];
|
| 454 |
}
|
| 455 |
|
| 456 |
return $text;
|
| 469 |
*/
|
| 470 |
public function customize_woocommerce_sale_flash( $html, $_, $product ) {
|
| 471 |
|
| 472 |
+
$text = '';
|
| 473 |
+
|
| 474 |
if ( is_product() && isset( $this->filters['single_sale_flash_text'] ) ) {
|
| 475 |
|
| 476 |
$text = $this->filters['single_sale_flash_text'];
|
| 477 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 478 |
} elseif ( ! is_product() && isset( $this->filters['loop_sale_flash_text'] ) ) {
|
| 479 |
|
| 480 |
$text = $this->filters['loop_sale_flash_text'];
|
| 481 |
+
}
|
| 482 |
|
| 483 |
+
// only get sales percentages when we should be replacing text
|
| 484 |
+
// check "false" specifically since the position could be 0
|
| 485 |
+
if ( false !== strpos( $text, '{percent}' ) ) {
|
|
|
|
|
|
|
|
|
|
|
|
|
| 486 |
|
| 487 |
+
$percent = $this->get_sale_percentage( $product );
|
| 488 |
+
$text = str_replace( '{percent}', "{$percent}%", $text );
|
| 489 |
}
|
| 490 |
|
| 491 |
+
return ! empty( $text ) ? "<span class='onsale'>{$text}</span>" : $html;
|
| 492 |
}
|
| 493 |
|
| 494 |
|
| 604 |
}
|
| 605 |
|
| 606 |
|
| 607 |
+
/**
|
| 608 |
+
* Gets the integrations class instance.
|
| 609 |
+
*
|
| 610 |
+
* @since 2.6.0
|
| 611 |
+
*
|
| 612 |
+
* @return \WC_Customizer_Integrations
|
| 613 |
+
*/
|
| 614 |
+
public function get_integrations_instance() {
|
| 615 |
+
return $this->integrations;
|
| 616 |
+
}
|
| 617 |
+
|
| 618 |
+
|
| 619 |
/** Lifecycle methods ******************************************************/
|
| 620 |
|
| 621 |
|
