WordPress at Your Fingertips
function is not described

WC_Twenty_Twenty::set_white_background() public WC 1.0

Set background color to white if it's default, otherwise don't touch it.

{} It's a method of the class: WC_Twenty_Twenty{}

No Hooks.

Return

null. Nothing.

Usage

$result = WC_Twenty_Twenty::set_white_background();

Code of WC_Twenty_Twenty::set_white_background() WC 6.1.1

public static function set_white_background() {
	$background         = sanitize_hex_color_no_hash( get_theme_mod( 'background_color' ) );
	$background_default = 'f5efe0';

	// Don't change user's choice of background color.
	if ( ! empty( $background ) && $background !== $background_default ) {
		return;
	}

	// In case default background is found, change it to white.
	set_theme_mod( 'background_color', 'fff' );
}