WordPress at Your Fingertips
function is not described

WC_REST_CRUD_Controller::get_object() protected WC 1.0

Get object.

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

No Hooks.


Object. WC_Data object or WP_Error object.


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

Code of WC_REST_CRUD_Controller::get_object() WC 5.9.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 ) );