Automattic\WooCommerce\Internal\ProductAttributes

VisualAttributeTermAdmin::is_ajax_add_attribute_request │ private │ WC 1.0

Check whether the current request is the add attribute AJAX action.

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

Хуков нет.

Возвращает

bool.

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

// private - только в коде основоного (родительского) класса
$result = $this->is_ajax_add_attribute_request(): bool;

Код VisualAttributeTermAdmin::is_ajax_add_attribute_request() WC 11.2.2

private function is_ajax_add_attribute_request(): bool {
	$action = isset( $_REQUEST['action'] ) ? sanitize_text_field( wp_unslash( $_REQUEST['action'] ) ) : ''; // phpcs:ignore WordPress.Security.NonceVerification.Recommended

	return wp_doing_ajax() && 'woocommerce_add_new_attribute' === $action;
}