Automattic\WooCommerce\Internal\LegacyAssets
LegacySelect2UsageTracker::is_legacy_select2_printed
Check whether a legacy Select2 handle has been printed.
Method of the class: LegacySelect2UsageTracker{}
No Hooks.
Returns
bool.
Usage
// private - for code of main (parent) class only $result = $this->is_legacy_select2_printed(): bool;
LegacySelect2UsageTracker::is_legacy_select2_printed() LegacySelect2UsageTracker::is legacy select2 printed code WC 11.2.1
private function is_legacy_select2_printed(): bool {
foreach ( self::LEGACY_HANDLES as $handle ) {
if ( wp_script_is( $handle, 'done' ) ) {
return true;
}
}
return false;
}