Automattic\WooCommerce\Api\Infrastructure

Main::is_get_endpoint_enabledpublic staticWC 1.0

Whether the GraphQL endpoint accepts GET requests.

Defaults to false. Reads from the option written by the GraphQL settings section so the REST route registration can decide which HTTP methods to accept.

Method of the class: Main{}

No Hooks.

Returns

null. Nothing (null).

Usage

$result = Main::is_get_endpoint_enabled(): bool;

Main::is_get_endpoint_enabled() code WC 11.0.1

public static function is_get_endpoint_enabled(): bool {
	return wc_string_to_bool( get_option( self::OPTION_GET_ENDPOINT_ENABLED, 'yes' ) );
}