WC_Settings_Tracking::possibly_add_settings_tracking_scripts()publicWC 1.0

Adds the tracking scripts for product setting pages.

Метод класса: WC_Settings_Tracking{}

Хуков нет.

Возвращает

null. Ничего.

Использование

$WC_Settings_Tracking = new WC_Settings_Tracking();
$WC_Settings_Tracking->possibly_add_settings_tracking_scripts( $hook );
$hook(строка) (обязательный)
Page hook.

Код WC_Settings_Tracking::possibly_add_settings_tracking_scripts() WC 7.3.0

public function possibly_add_settings_tracking_scripts( $hook ) {
	// phpcs:disable WordPress.Security.ValidatedSanitizedInput.InputNotSanitized, WordPress.Security.NonceVerification
	if (
		! isset( $_GET['page'] ) ||
		'wc-settings' !== wp_unslash( $_GET['page'] )
	) {
		return;
	}
	// phpcs:enable

	WCAdminAssets::register_script( 'wp-admin-scripts', 'settings-tracking', false );
}