WC_REST_CRUD_Controller::get_object()protectedWC 1.0

Get object.

Method of the class: WC_REST_CRUD_Controller{}

No Hooks.

Return

Object. WC_Data object or WP_Error object.

Usage

// protected - for code of main (parent) or child class
$result = $this->get_object( $id );
$id(int) (required)
Object ID.

WC_REST_CRUD_Controller::get_object() code WC 8.7.0

protected function get_object( $id ) {
	// translators: %s: Class method name.
	return new WP_Error( 'invalid-method', sprintf( __( "Method '%s' not implemented. Must be overridden in subclass.", 'woocommerce' ), __METHOD__ ), array( 'status' => 405 ) );
}