Automattic\WooCommerce\Internal\Admin\Settings

SettingsUISchema::emit_conversion_notice │ private static │ WC 1.0

Emit one compatibility notice for all affected fields.

Method of the class: SettingsUISchema{}

No Hooks.

Returns

null. Nothing (null).

Usage

$result = SettingsUISchema::emit_conversion_notice( $method, $field_ids, $message, $version ): void;
$method(string) (required)
Method name reported by the notice.
$field_ids(string[]) (required)
Affected field ids.
$message(string) (required)
Translatable sprintf message.
$version(string) (required)
Version when the notice was introduced.

SettingsUISchema::emit_conversion_notice() code WC 11.2.1

private static function emit_conversion_notice( string $method, array $field_ids, string $message, string $version ): void {
	if ( empty( $field_ids ) ) {
		return;
	}

	wc_doing_it_wrong(
		$method,
		sprintf(
			/* translators: %s: comma-separated field ids. */
			esc_html( $message ),
			esc_html( implode( ', ', array_unique( $field_ids ) ) )
		),
		$version
	);
}