Update woocommerce.php
This commit is contained in:
parent
c66f2b8232
commit
43423a0c2e
|
@ -157,8 +157,8 @@ final class WooCommerce {
|
||||||
}
|
}
|
||||||
else switch( $key ) {
|
else switch( $key ) {
|
||||||
case 'template_url':
|
case 'template_url':
|
||||||
_deprecated_argument( 'Woocommerce->template_url', '2.1', 'WC_TEMPLATE_PATH constant' );
|
_deprecated_argument( 'Woocommerce->template_url', '2.1', 'Use WC()->template_path()' );
|
||||||
return WC_TEMPLATE_PATH;
|
return $this->template_path();
|
||||||
case 'messages':
|
case 'messages':
|
||||||
_deprecated_argument( 'Woocommerce->messages', '2.1', 'Use wc_get_notices' );
|
_deprecated_argument( 'Woocommerce->messages', '2.1', 'Use wc_get_notices' );
|
||||||
return wc_get_notices( 'success' );
|
return wc_get_notices( 'success' );
|
||||||
|
@ -231,6 +231,10 @@ final class WooCommerce {
|
||||||
define( 'WC_VERSION', $this->version );
|
define( 'WC_VERSION', $this->version );
|
||||||
define( 'WOOCOMMERCE_VERSION', WC_VERSION ); // Backwards compat
|
define( 'WOOCOMMERCE_VERSION', WC_VERSION ); // Backwards compat
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @deprecated 2.2
|
||||||
|
* @deprecated Use WC()->template_path()
|
||||||
|
*/
|
||||||
if ( ! defined( 'WC_TEMPLATE_PATH' ) ) {
|
if ( ! defined( 'WC_TEMPLATE_PATH' ) ) {
|
||||||
define( 'WC_TEMPLATE_PATH', $this->template_path() );
|
define( 'WC_TEMPLATE_PATH', $this->template_path() );
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue