• File: setup-state-endpoint.php
  • Full Path: /home/slvgwrnz/public_html/wp-content/plugins/elementor/modules/pro-setup-promotion/data/endpoints/setup-state-endpoint.php
  • Date Modified: 11/09/2026 10:39 AM
  • File size: 703 bytes
  • MIME-type: text/x-php
  • Charset: utf-8
<?php

namespace Elementor\Modules\ProSetupPromotion\Data\Endpoints;

use Elementor\Data\V2\Base\Endpoint as Endpoint_Base;
use Elementor\Modules\ProSetupPromotion\Setup_State;
use WP_REST_Server;

if ( ! defined( 'ABSPATH' ) ) {
	exit;
}

class Setup_State_Endpoint extends Endpoint_Base {

	public function get_name(): string {
		return 'setup-state';
	}

	public function get_format(): string {
		return 'pro-setup-promotion';
	}

	protected function register(): void {
		parent::register();

		$this->register_items_route( WP_REST_Server::READABLE );
	}

	public function get_items( $request ) {
		return [
			'data' => [
				'proSetupPromotion' => Setup_State::get_editor_config(),
			],
		];
	}
}