Restored WooCommerce->define access to private

This commit is contained in:
Claudio Sanches 2017-09-06 14:47:35 -03:00
parent a13158a75a
commit 4e9cf1c598
2 changed files with 7 additions and 5 deletions

View File

@ -225,7 +225,7 @@ final class WooCommerce {
* @param string $name Constant name.
* @param string|bool $value Constant value.
*/
public function define( $name, $value ) {
private function define( $name, $value ) {
if ( ! defined( $name ) ) {
define( $name, $value );
}

View File

@ -57,12 +57,14 @@ add_filter( 'woocommerce_short_description', 'wc_do_oembeds' );
/**
* Define a constant if it is not already defined.
*
* @since 3.0.0
* @param string $name
* @param string $value
* @since 3.0.0
* @param string $name Constant name.
* @param string $value Value.
*/
function wc_maybe_define_constant( $name, $value ) {
WC()->define( $name, $value );
if ( ! defined( $name ) ) {
define( $name, $value );
}
}
/**