Version Description
- Misc - Added support for WooCommerce 2.6
- Misc - Removed support for WooCommerce 2.3
Download this release
Release Info
| Developer | SkyVerge |
| Plugin | |
| Version | 2.3.0 |
| Comparing to | |
| See all releases | |
Code changes from version 2.2.0 to 2.3.0
- i18n/languages/woocommerce-customizer.pot +19 -7
- includes/class-wc-customizer-settings.php +2 -2
- readme.txt +10 -6
- woocommerce-customizer.php +104 -22
i18n/languages/woocommerce-customizer.pot
CHANGED
|
@@ -2,7 +2,7 @@
|
|
| 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://github.com/skyverge/woocommerce-customizer/issues\n"
|
| 8 |
"POT-Creation-Date: 2014-09-05 23:18:53+00:00\n"
|
|
@@ -241,21 +241,33 @@ msgstr ""
|
|
| 241 |
msgid "Change the default placeholder image by setting this to a valid image URL"
|
| 242 |
msgstr ""
|
| 243 |
|
| 244 |
-
#: woocommerce-customizer.php:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 245 |
msgid ""
|
| 246 |
-
"%sWooCommerce Customizer is inactive.%s This version requires
|
| 247 |
-
"2.
|
|
|
|
| 248 |
msgstr ""
|
| 249 |
|
| 250 |
-
#: woocommerce-customizer.php:
|
| 251 |
msgid "Configure"
|
| 252 |
msgstr ""
|
| 253 |
|
| 254 |
-
#: woocommerce-customizer.php:
|
| 255 |
msgid "FAQ"
|
| 256 |
msgstr ""
|
| 257 |
|
| 258 |
-
#: woocommerce-customizer.php:
|
| 259 |
msgid "Support"
|
| 260 |
msgstr ""
|
| 261 |
|
| 2 |
# This file is distributed under the GNU General Public License v3.0.
|
| 3 |
msgid ""
|
| 4 |
msgstr ""
|
| 5 |
+
"Project-Id-Version: WooCommerce Customizer 2.3.0\n"
|
| 6 |
"Report-Msgid-Bugs-To: "
|
| 7 |
"https://github.com/skyverge/woocommerce-customizer/issues\n"
|
| 8 |
"POT-Creation-Date: 2014-09-05 23:18:53+00:00\n"
|
| 241 |
msgid "Change the default placeholder image by setting this to a valid image URL"
|
| 242 |
msgstr ""
|
| 243 |
|
| 244 |
+
#: woocommerce-customizer.php:121
|
| 245 |
+
#. translators: Placeholders: %s - plugin name
|
| 246 |
+
msgid "You cannot clone instances of %s."
|
| 247 |
+
msgstr ""
|
| 248 |
+
|
| 249 |
+
#: woocommerce-customizer.php:133
|
| 250 |
+
#. translators: Placeholders: %s - plugin name
|
| 251 |
+
msgid "You cannot unserialize instances of %s."
|
| 252 |
+
msgstr ""
|
| 253 |
+
|
| 254 |
+
#: woocommerce-customizer.php:226
|
| 255 |
+
#. translators: %1$s and %2$s are <strong> tags. %3$s and %4$s are <a> tags
|
| 256 |
msgid ""
|
| 257 |
+
"%1$sWooCommerce Customizer is inactive.%2$s This version requires "
|
| 258 |
+
"WooCommerce 2.4.13 or newer. Please %3$supdate WooCommerce to version "
|
| 259 |
+
"2.4.13 or newer%4$s"
|
| 260 |
msgstr ""
|
| 261 |
|
| 262 |
+
#: woocommerce-customizer.php:333
|
| 263 |
msgid "Configure"
|
| 264 |
msgstr ""
|
| 265 |
|
| 266 |
+
#: woocommerce-customizer.php:334
|
| 267 |
msgid "FAQ"
|
| 268 |
msgstr ""
|
| 269 |
|
| 270 |
+
#: woocommerce-customizer.php:335
|
| 271 |
msgid "Support"
|
| 272 |
msgstr ""
|
| 273 |
|
includes/class-wc-customizer-settings.php
CHANGED
|
@@ -22,7 +22,7 @@
|
|
| 22 |
* @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License v3.0
|
| 23 |
*/
|
| 24 |
|
| 25 |
-
|
| 26 |
|
| 27 |
/**
|
| 28 |
* Settings
|
|
@@ -386,4 +386,4 @@ class WC_Customizer_Settings extends WC_Settings_Page {
|
|
| 386 |
}
|
| 387 |
|
| 388 |
// setup settings
|
| 389 |
-
return
|
| 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 |
* Settings
|
| 386 |
}
|
| 387 |
|
| 388 |
// setup settings
|
| 389 |
+
return wc_customizer()->settings = new WC_Customizer_Settings();
|
readme.txt
CHANGED
|
@@ -2,11 +2,11 @@
|
|
| 2 |
Contributors: SkyVerge, maxrice, tamarazuk, chasewiseman, nekojira
|
| 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
|
| 5 |
-
Requires at least: 4.
|
| 6 |
-
Tested up to: 4.
|
| 7 |
-
Requires WooCommerce at least: 2.
|
| 8 |
-
Tested WooCommerce up to: 2.
|
| 9 |
-
Stable tag: 2.
|
| 10 |
License: GPLv3 or later
|
| 11 |
License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
| 12 |
|
|
@@ -18,7 +18,7 @@ WooCommerce includes tons of filters to let you customize button text, labels, a
|
|
| 18 |
code to use them. This plugin provides a settings page where you can add your customizations and save them without
|
| 19 |
needing to write any code or modify any templates, which is helpful for quick change testing.
|
| 20 |
|
| 21 |
-
> Requires WooCommerce 2.
|
| 22 |
|
| 23 |
Here are some customizations you can make:
|
| 24 |
|
|
@@ -74,6 +74,10 @@ Yes! Fork the plugin on [GitHub](https://github.com/skyverge/woocommerce-customi
|
|
| 74 |
|
| 75 |
== Changelog ==
|
| 76 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 77 |
= 2.2.0 =
|
| 78 |
* Misc - Added support for WooCommerce 2.5
|
| 79 |
* Misc - Removed support for WooCommerce 2.2
|
| 2 |
Contributors: SkyVerge, maxrice, tamarazuk, chasewiseman, nekojira
|
| 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
|
| 5 |
+
Requires at least: 4.1
|
| 6 |
+
Tested up to: 4.5.2
|
| 7 |
+
Requires WooCommerce at least: 2.4.13
|
| 8 |
+
Tested WooCommerce up to: 2.6.0
|
| 9 |
+
Stable tag: 2.3.0
|
| 10 |
License: GPLv3 or later
|
| 11 |
License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
| 12 |
|
| 18 |
code to use them. This plugin provides a settings page where you can add your customizations and save them without
|
| 19 |
needing to write any code or modify any templates, which is helpful for quick change testing.
|
| 20 |
|
| 21 |
+
> Requires WooCommerce 2.4.13+
|
| 22 |
|
| 23 |
Here are some customizations you can make:
|
| 24 |
|
| 74 |
|
| 75 |
== Changelog ==
|
| 76 |
|
| 77 |
+
= 2.3.0 =
|
| 78 |
+
* Misc - Added support for WooCommerce 2.6
|
| 79 |
+
* Misc - Removed support for WooCommerce 2.3
|
| 80 |
+
|
| 81 |
= 2.2.0 =
|
| 82 |
* Misc - Added support for WooCommerce 2.5
|
| 83 |
* Misc - Removed support for WooCommerce 2.2
|
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
|
|
@@ -21,30 +21,17 @@
|
|
| 21 |
* @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License v3.0
|
| 22 |
*/
|
| 23 |
|
| 24 |
-
|
| 25 |
|
| 26 |
// Check if WooCommerce is active
|
| 27 |
-
if ( !
|
| 28 |
return;
|
|
|
|
| 29 |
|
| 30 |
// WC version check
|
| 31 |
-
if ( version_compare( get_option( 'woocommerce_db_version' ), '2.
|
| 32 |
-
|
| 33 |
-
function woocommerce_customizer_outdated_version_notice() {
|
| 34 |
-
|
| 35 |
-
$message = sprintf(
|
| 36 |
-
__( '%sWooCommerce Customizer is inactive.%s This version requires WooCommerce 2.3 or newer. Please %supdate WooCommerce to version 2.3 or newer%s', 'woocommerce-customizer' ),
|
| 37 |
-
'<strong>',
|
| 38 |
-
'</strong>',
|
| 39 |
-
'<a href="' . admin_url( 'plugins.php' ) . '">',
|
| 40 |
-
' »</a>'
|
| 41 |
-
);
|
| 42 |
-
|
| 43 |
-
echo sprintf( '<div class="error"><p>%s</p></div>', $message );
|
| 44 |
-
}
|
| 45 |
-
|
| 46 |
-
add_action( 'admin_notices', 'woocommerce_customizer_outdated_version_notice' );
|
| 47 |
|
|
|
|
| 48 |
return;
|
| 49 |
}
|
| 50 |
|
|
@@ -84,7 +71,10 @@ class WC_Customizer {
|
|
| 84 |
|
| 85 |
|
| 86 |
/** plugin version number */
|
| 87 |
-
const VERSION = '2.
|
|
|
|
|
|
|
|
|
|
| 88 |
|
| 89 |
/** @var \WC_Customizer_Settings instance */
|
| 90 |
public $settings;
|
|
@@ -120,6 +110,30 @@ class WC_Customizer {
|
|
| 120 |
}
|
| 121 |
|
| 122 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 123 |
/**
|
| 124 |
* Add settings page
|
| 125 |
*
|
|
@@ -182,6 +196,44 @@ class WC_Customizer {
|
|
| 182 |
}
|
| 183 |
|
| 184 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 185 |
/** Frontend methods ******************************************************/
|
| 186 |
|
| 187 |
|
|
@@ -288,6 +340,24 @@ class WC_Customizer {
|
|
| 288 |
}
|
| 289 |
|
| 290 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 291 |
/** Lifecycle methods ******************************************************/
|
| 292 |
|
| 293 |
|
|
@@ -330,9 +400,21 @@ class WC_Customizer {
|
|
| 330 |
}
|
| 331 |
|
| 332 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 333 |
/**
|
| 334 |
* The WC_Customizer global object
|
|
|
|
| 335 |
* @name $wc_customizer
|
| 336 |
* @global WC_Customizer $GLOBALS['wc_customizer']
|
| 337 |
*/
|
| 338 |
-
$GLOBALS['wc_customizer'] =
|
| 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.3.0
|
| 9 |
* Text Domain: woocommerce-customizer
|
| 10 |
* Domain Path: /i18n/languages/
|
| 11 |
*
|
| 12 |
+
* Copyright: (c) 2013-2016 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
|
| 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::is_woocommerce_active() ) {
|
| 28 |
return;
|
| 29 |
+
}
|
| 30 |
|
| 31 |
// WC version check
|
| 32 |
+
if ( version_compare( get_option( 'woocommerce_db_version' ), '2.4.13', '<' ) ) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 33 |
|
| 34 |
+
add_action( 'admin_notices', WC_Customizer::render_outdated_wc_version_notice() );
|
| 35 |
return;
|
| 36 |
}
|
| 37 |
|
| 71 |
|
| 72 |
|
| 73 |
/** plugin version number */
|
| 74 |
+
const VERSION = '2.3.0';
|
| 75 |
+
|
| 76 |
+
/** @var \WC_Customizer single instance of this plugin */
|
| 77 |
+
protected static $instance;
|
| 78 |
|
| 79 |
/** @var \WC_Customizer_Settings instance */
|
| 80 |
public $settings;
|
| 110 |
}
|
| 111 |
|
| 112 |
|
| 113 |
+
/**
|
| 114 |
+
* Cloning instances is forbidden due to singleton pattern.
|
| 115 |
+
*
|
| 116 |
+
* @since 2.3.0
|
| 117 |
+
*/
|
| 118 |
+
public function __clone() {
|
| 119 |
+
|
| 120 |
+
/* translators: Placeholders: %s - plugin name */
|
| 121 |
+
_doing_it_wrong( __FUNCTION__, sprintf( esc_html__( 'You cannot clone instances of %s.', 'woocommerce-customizer' ), 'WooCommerce Customizer' ), '2.3.0' );
|
| 122 |
+
}
|
| 123 |
+
|
| 124 |
+
|
| 125 |
+
/**
|
| 126 |
+
* Unserializing instances is forbidden due to singleton pattern.
|
| 127 |
+
*
|
| 128 |
+
* @since 2.3.0
|
| 129 |
+
*/
|
| 130 |
+
public function __wakeup() {
|
| 131 |
+
|
| 132 |
+
/* translators: Placeholders: %s - plugin name */
|
| 133 |
+
_doing_it_wrong( __FUNCTION__, sprintf( esc_html__( 'You cannot unserialize instances of %s.', 'woocommerce-customizer' ), 'WooCommerce Customizer' ), '2.3.0' );
|
| 134 |
+
}
|
| 135 |
+
|
| 136 |
+
|
| 137 |
/**
|
| 138 |
* Add settings page
|
| 139 |
*
|
| 196 |
}
|
| 197 |
|
| 198 |
|
| 199 |
+
/**
|
| 200 |
+
* Checks if WooCommerce is active
|
| 201 |
+
*
|
| 202 |
+
* @since 2.3.0
|
| 203 |
+
* @return bool true if WooCommerce is active, false otherwise
|
| 204 |
+
*/
|
| 205 |
+
public static function is_woocommerce_active() {
|
| 206 |
+
|
| 207 |
+
$active_plugins = (array) get_option( 'active_plugins', array() );
|
| 208 |
+
|
| 209 |
+
if ( is_multisite() ) {
|
| 210 |
+
$active_plugins = array_merge( $active_plugins, get_site_option( 'active_sitewide_plugins', array() ) );
|
| 211 |
+
}
|
| 212 |
+
|
| 213 |
+
return in_array( 'woocommerce/woocommerce.php', $active_plugins ) || array_key_exists( 'woocommerce/woocommerce.php', $active_plugins );
|
| 214 |
+
}
|
| 215 |
+
|
| 216 |
+
|
| 217 |
+
/**
|
| 218 |
+
* Renders a notice when WooCommerce version is outdated
|
| 219 |
+
*
|
| 220 |
+
* @since 2.3.0
|
| 221 |
+
*/
|
| 222 |
+
public static function render_outdated_wc_version_notice() {
|
| 223 |
+
|
| 224 |
+
$message = sprintf(
|
| 225 |
+
/* translators: %1$s and %2$s are <strong> tags. %3$s and %4$s are <a> tags */
|
| 226 |
+
__( '%1$sWooCommerce Customizer is inactive.%2$s This version requires WooCommerce 2.4.13 or newer. Please %3$supdate WooCommerce to version 2.4.13 or newer%4$s', 'woocommerce-customizer' ),
|
| 227 |
+
'<strong>',
|
| 228 |
+
'</strong>',
|
| 229 |
+
'<a href="' . admin_url( 'plugins.php' ) . '">',
|
| 230 |
+
' »</a>'
|
| 231 |
+
);
|
| 232 |
+
|
| 233 |
+
printf( '<div class="error"><p>%s</p></div>', $message );
|
| 234 |
+
}
|
| 235 |
+
|
| 236 |
+
|
| 237 |
/** Frontend methods ******************************************************/
|
| 238 |
|
| 239 |
|
| 340 |
}
|
| 341 |
|
| 342 |
|
| 343 |
+
/** Helper methods ******************************************************/
|
| 344 |
+
|
| 345 |
+
|
| 346 |
+
/**
|
| 347 |
+
* Main Customizer Instance, ensures only one instance is/can be loaded
|
| 348 |
+
*
|
| 349 |
+
* @since 2.3.0
|
| 350 |
+
* @see wc_customizer()
|
| 351 |
+
* @return \WC_Customizer
|
| 352 |
+
*/
|
| 353 |
+
public static function instance() {
|
| 354 |
+
if ( is_null( self::$instance ) ) {
|
| 355 |
+
self::$instance = new self();
|
| 356 |
+
}
|
| 357 |
+
return self::$instance;
|
| 358 |
+
}
|
| 359 |
+
|
| 360 |
+
|
| 361 |
/** Lifecycle methods ******************************************************/
|
| 362 |
|
| 363 |
|
| 400 |
}
|
| 401 |
|
| 402 |
|
| 403 |
+
/**
|
| 404 |
+
* Returns the One True Instance of Customizer
|
| 405 |
+
*
|
| 406 |
+
* @since 2.3.0
|
| 407 |
+
* @return \WC_Customizer
|
| 408 |
+
*/
|
| 409 |
+
function wc_customizer() {
|
| 410 |
+
return WC_Customizer::instance();
|
| 411 |
+
}
|
| 412 |
+
|
| 413 |
+
|
| 414 |
/**
|
| 415 |
* The WC_Customizer global object
|
| 416 |
+
* @deprecated 2.3.0
|
| 417 |
* @name $wc_customizer
|
| 418 |
* @global WC_Customizer $GLOBALS['wc_customizer']
|
| 419 |
*/
|
| 420 |
+
$GLOBALS['wc_customizer'] = wc_customizer();
|
