# cookiez/0.0.3/modules/reviews/classes/feedback-client.php

Cookie Consent – GDPR &amp; CCPA Cookie Banner &amp; Consent Manager, version 0.0.3. 38 lines.

- Page: https://pluginprobe.com/plugins/cookiez/0.0.3/code/modules/reviews/classes/feedback-client.php
- Raw: https://pluginprobe.com/plugins/cookiez/0.0.3/raw/modules/reviews/classes/feedback-client.php
- Modified: 2026-05-18T12:03:54+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/cookiez/0.0.3/code/modules/reviews/classes/feedback-client.php#L10-L20`.

```php
<?php

namespace Cookiez\Modules\Reviews\Classes;

use Cookiez\Classes\Services\Client;
use Exception;

if ( ! defined( 'ABSPATH' ) ) {
	exit; // Exit if accessed directly
}

class Feedback_Client {

	private const SERVICE_ENDPOINT = 'feedback/reviews';

	/**
	 * Send request to the service to submit the feedback.
	 *
	 * @param array<string, mixed> $params Request payload.
	 *
	 * @return mixed
	 * @throws Exception When the request fails.
	 */
	public static function post_feedback( $params ) {
		$response = Client::get_instance()->make_request(
			'POST',
			self::SERVICE_ENDPOINT,
			$params
		);

		if ( empty( $response ) || is_wp_error( $response ) ) {
			throw new Exception( 'Failed to add the feedback.' );
		}

		return $response;
	}
}

```
