Automattic\WooCommerce\Internal
BrandingController::use_new_branding()
Tells if the new WooCommerce branding should be used.
By default, this returns false, to have it return true you can:
- Define the WOOCOMMERCE_USE_NEW_BRANDING constant with a value of true; or
- Hook on the woocommerce_use_new_branding and have it return true (it receives the value of WOOCOMMERCE_USE_NEW_BRANDING, or false if the constant doesn't exist).
Method of the class: BrandingController{}
Hooks from the method
Return
true|false
. True if the new WooCommerce branding should be used, false otherwise.
Usage
$result = BrandingController::use_new_branding(): bool;
BrandingController::use_new_branding() BrandingController::use new branding code WC 9.6.0
public static function use_new_branding(): bool { $should_use = defined( 'WOOCOMMERCE_USE_NEW_BRANDING' ) && true === WOOCOMMERCE_USE_NEW_BRANDING; /** * Hook to decide if the new WooCommerce branding should be used. * * @param bool $should_use Value of the WOOCOMMERCE_USE_NEW_BRANDING constant, false if the constant doesn't exist. * * @since 9.6.0 */ return apply_filters( 'woocommerce_use_new_branding', $should_use ); }