This repository was archived by the owner on Jul 6, 2025. It is now read-only.

Description
352: public function get_items( $request ) {
353: $query_args = $this->prepare_objects_query( $request );
354: $query_results = $this->get_objects( $query_args );
355:
356: $objects = array();
357: foreach ( $query_results['objects'] as $object ) {
358: if ( ! wc_rest_check_post_permissions( $this->post_type, 'read', $object->get_id() ) ) {
359: continue;
360: }
361:
362:
the $object on line 357 should be validated first. If not sometimes it will show error when $object is not the value we expected.
Error: Call to a member function get_id() on boolean (line 358)