get_data() ); if ( ! empty( $this->query_args['filters'] ) && is_array( $this->query_args['filters'] ) ) { foreach ( $this->query_args['filters'] as $filter ) { $zones = array_filter( $zones, $filter ); } } return wp_list_pluck( $zones, 'id' ); } /** * Return an array of items from the query * * @return array */ public function get_ids_from_query() { return ! empty( $this->query ) ? $this->query : []; } /** * Validates offset. * * @param mixed $offset Decoded query cursor. * * @return bool */ public function is_valid_offset( $offset ) { return is_string( $offset ); } /** * Validates shipping zone model. * * @param array $model Shipping zone model. * * @return bool */ protected function is_valid_model( $model ) { return ! empty( $model ) && $model instanceof Shipping_Zone && 0 !== $model->ID; } }