Automattic\WooCommerce\Api\Infrastructure

GraphQLControllerBase::get_debug_flagsprivateWC 1.0

Determine debug flags for the request, based on {@see self::is_debug_mode()}.

Method of the class: GraphQLControllerBase{}

No Hooks.

Returns

null. Nothing (null).

Usage

// private - for code of main (parent) class only
$result = $this->get_debug_flags( $request, ?object $principal ): int;
$request(WP_REST_Request) (required)
The REST request.
?object $principal(required)
.

GraphQLControllerBase::get_debug_flags() code WC 10.9.1

private function get_debug_flags( \WP_REST_Request $request, ?object $principal ): int {
	if ( ! $this->is_debug_mode( $principal, $request ) ) {
		return DebugFlag::NONE;
	}
	return DebugFlag::INCLUDE_DEBUG_MESSAGE | DebugFlag::INCLUDE_TRACE;
}