Automattic\WooCommerce\Blocks\Utils

BlocksSharedState::load_placeholder_imagepublic staticWC 1.0

Load placeholder image into interactivity config.

Method of the class: BlocksSharedState{}

No Hooks.

Returns

null. Nothing (null).

Usage

$result = BlocksSharedState::load_placeholder_image( $consent_statement ): void;
$consent_statement(string) (required)
The consent statement string.

BlocksSharedState::load_placeholder_image() code WC 10.8.1

public static function load_placeholder_image( string $consent_statement ): void {
	self::check_consent( $consent_statement );

	wp_interactivity_config(
		self::$settings_namespace,
		array( 'placeholderImgSrc' => wc_placeholder_img_src() )
	);
}