Warning: This method has been deprecated.

WC_Legacy_API::register_resources( WC_API_Server $server )

Register available API resources.


Description Description


Parameters Parameters

$server

(Required) the REST server.


Top ↑

Source Source

File: includes/legacy/class-wc-legacy-api.php

	public function register_resources( $server ) {

		$api_classes = apply_filters( 'woocommerce_api_classes',
			array(
				'WC_API_Coupons',
				'WC_API_Customers',
				'WC_API_Orders',
				'WC_API_Products',
				'WC_API_Reports',
				'WC_API_Taxes',
				'WC_API_Webhooks',
			)
		);

		foreach ( $api_classes as $api_class ) {
			$this->$api_class = new $api_class( $server );
		}
	}

Top ↑

Changelog Changelog

Changelog
Version Description
2.6.0 This method has been deprecated.
2.1 Introduced.


Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.