WordPress at Your Fingertips
function is not described

WC_Legacy_API::register_resources() public WC 2.1

Deprecated from version 2.6.0. It is no longer supported and can be removed in future releases. It is recommended to replace this function with the same one.

Register available API resources.

{} It's a method of the class: WC_Legacy_API{}

Hooks from the method

null. Nothing.


$WC_Legacy_API = new WC_Legacy_API();
$WC_Legacy_API->register_resources( $server );
$server(WC_API_Server) (required)
the REST server.


Since 2.1 Introduced.
Deprecated 2.6.0

Code of WC_Legacy_API::register_resources() WC 5.7.1

public function register_resources( $server ) {

	$api_classes = apply_filters( 'woocommerce_api_classes',

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