title: Why is 'szbd-shipping-method:5' not being unset by my snippet here?
body: <p>To open, I do not know PHP. I have cobbled this snippet together from the information in these two links -&gt; <a href="https://stackoverflow.com/questions/28236466/show-and-hide-div-based-on-day-and-time">Show and Hide div based on day and time</a> and -&gt; <a href="https://avada.io/woocommerce/docs/disable-shipping-methods-certain-products.html" rel="nofollow noreferrer">https://avada.io/woocommerce/docs/disable-shipping-methods-certain-products.html</a></p>
  <p>My desired outcome is to remove the delivery options from checkout while leaving the two pickup options.</p>
  <p>Currently the snippet is running, but doesn't do anything, however if I do not return the $rates properly, all of shipping options including pickup get nerfed, so I know I'm in the ballpark.</p>
  <p>Here is the snippet I'm running</p>
  <pre><code>function lf_hide_shipping_for_closed_hours( $rates ) {
  
      date_default_timezone_set('America/Vancouver');
      $currentTime = date(&quot;Gi&quot;);
  
      $deliveryStart = 1200;
      $deliveryEnd = 1945;
  
      // Check if we are open
      if ($currentTime &lt;= $deliveryStart &amp;&amp; $currentTime &gt; $deliveryEnd){
          foreach ( $rates as $rate_id =&gt; $rate ) {
              if ( 'szbd-shipping-method:5' === $rate-&gt;get_method_id() ) {
              unset( $rates[ $rate_id ] );
              }
          }
      }
      return $rates;
  }
  
  add_filter( 'woocommerce_package_rates', 'lf_hide_shipping_for_closed_hours', 100 );
  </code></pre>
  <p>How can I modify my snippet to achieve this?</p>
  <p>Edit, here is the site url in question.</p>
  <p><a href="https://dev-site.potorium.ca/" rel="nofollow noreferrer">https://dev-site.potorium.ca/</a></p>