Automattic\WooCommerce\Internal

BrandingController::use_new_branding()public staticWC 1.0

Tells if the new WooCommerce branding should be used.

By default, this returns false, to have it return true you can:

  1. Define the WOOCOMMERCE_USE_NEW_BRANDING constant with a value of true; or
  2. 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() 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 );
}