Restored WooCommerce->define access to private
This commit is contained in:
parent
a13158a75a
commit
4e9cf1c598
|
@ -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 );
|
||||
}
|
||||
|
|
|
@ -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 );
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue