Automattic\WooCommerce\Admin\API

PaymentGatewaySuggestions::get_suggestions()publicWC 1.0

Return suggested payment gateways.

{} Это метод класса: PaymentGatewaySuggestions{}

Хуков нет.

Возвращает

\WP_Error|\WP_HTTP_Response|\WP_REST_Response.

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

$PaymentGatewaySuggestions = new PaymentGatewaySuggestions();
$PaymentGatewaySuggestions->get_suggestions( $request );
$request(WP_REST_Request) (обязательный)
Full details about the request.

Код PaymentGatewaySuggestions::get_suggestions() WC 6.6.1

public function get_suggestions( $request ) {
	if ( Suggestions::should_display() ) {
		return Suggestions::get_suggestions();
	}

	return rest_ensure_response( array() );
}