Automattic\WooCommerce\Internal\Admin\Settings

PaymentsController::add_body_classes │ public │ WC 1.0

Adds body classes when in the Payments Settings admin area.

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

Хуков нет.

Возвращает

string. The modified body classes for the admin area.

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

$PaymentsController = new PaymentsController();
$PaymentsController->add_body_classes( $classes );
$classes(строка)
The existing body classes for the admin area.
По умолчанию: ''

Код PaymentsController::add_body_classes() WC 11.2.1

public function add_body_classes( $classes = '' ) {
	global $current_tab;

	// Bail if the type is invalid.
	if ( ! is_string( $classes ) ) {
		return $classes;
	}

	if ( 'checkout' === $current_tab && ! str_contains( 'woocommerce-settings-payments-tab', $classes ) ) {
		$classes = "$classes woocommerce-settings-payments-tab";
	}

	return $classes;
}