403Webshell
Server IP : 51.91.236.193  /  Your IP : 216.73.216.224
Web Server : Apache
System : Linux webm010.cluster128.gra.hosting.ovh.net 6.18.39-ovh-vps-grsec-zfs+ #1 SMP PREEMPT_DYNAMIC Tue Jul 21 12:03:15 CEST 2026 x86_64
User : institutah ( 16501)
PHP Version : 7.2.34
Disable Function : _dyuweyrj4,_dyuweyrj4r,dl
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /home/institutah/www/wp-content/plugins/woocommerce/packages/woocommerce-blocks/src/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home/institutah/www/wp-content/plugins/woocommerce/packages/woocommerce-blocks/src//RestApi.php
<?php
/**
 * Registers controllers in the blocks REST API namespace.
 *
 * @package WooCommerce/Blocks
 */

namespace Automattic\WooCommerce\Blocks;

defined( 'ABSPATH' ) || exit;

/**
 * RestApi class.
 */
class RestApi {

	/**
	 * Initialize class features.
	 */
	public static function init() {
		add_action( 'rest_api_init', array( __CLASS__, 'register_rest_routes' ), 10 );
	}

	/**
	 * Register REST API routes.
	 */
	public static function register_rest_routes() {
		$controllers = self::get_controllers();

		foreach ( $controllers as $name => $class ) {
			$instance = new $class();
			$instance->register_routes();
		}
	}

	/**
	 * Return a list of controller classes for this REST API namespace.
	 *
	 * @return array
	 */
	protected static function get_controllers() {
		return [
			'product-attributes'      => __NAMESPACE__ . '\RestApi\Controllers\ProductAttributes',
			'product-attribute-terms' => __NAMESPACE__ . '\RestApi\Controllers\ProductAttributeTerms',
			'product-categories'      => __NAMESPACE__ . '\RestApi\Controllers\ProductCategories',
			'product-tags'            => __NAMESPACE__ . '\RestApi\Controllers\ProductTags',
			'products'                => __NAMESPACE__ . '\RestApi\Controllers\Products',
			'variations'              => __NAMESPACE__ . '\RestApi\Controllers\Variations',
		];
	}
}

Youez - 2016 - github.com/yon3zu
LinuXploit