WC_REST_CRUD_Controller::get_object()
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() WC REST CRUD Controller::get object code WC 9.7.1
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 ) ); }