namespace ImageOptimization\Modules\Reviews\Classes;
use ImageOptimization\Classes\Utils;
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly
const SERVICE_ENDPOINT = 'feedback/reviews';
* Send request to the service to submit the feedback.
public static function post_feedback( $params ) {
$response = Utils::get_api_client()->make_request(
if ( empty( $response ) || is_wp_error( $response ) ) {
throw new Exception( 'Failed to add the feedback.' );