source instanceof Shipping_Zone ) { $methods = $this->source->methods; } else { $wc_shipping = \WC_Shipping::instance(); $methods = $wc_shipping->get_shipping_methods(); } foreach ( $methods as $method ) { $this->get_loader()->prime( $method->id, new Shipping_Method( $method ) ); } // Get shipping method IDs. $methods = wp_list_pluck( array_values( $methods ), 'id' ); return $methods; } /** * 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 ); } }