title: How disable local pickup, when cart weight = 0 in WordPress
body: <p>pls how can I disable local pickup depending on a cart total weight? I want to disable possibility for local pickup when the cart total weight == 0. I used this snippet found elsewhere and modified, but it is not working and the local pickup is still offered</p>
  <pre><code>add_filter( 'woocommerce_package_rates', 'bbloomer_woocommerce_tiered_shipping', 9999, 2 );
      
  function bbloomer_woocommerce_tiered_shipping( $rates, $package ) {
       
       if ( WC()-&gt;cart-&gt;get_cart_contents_weight() == 0 ) {
         
            unset( $rates['local_pickup'] );
            unset( $rates['local_delivery'] );
       
       } 
       return $rates;
      }
  </code></pre>
  <p>What am I doing wrong please?</p>
  <hr />
  <p>Actually my code mentioned above is working. I did not realized two things:</p>
  <ol>
  <li><p>ID of my local_pickup was wrong, I did not explore the page to find out, that the correct variable name is 'local_pickup:13' (code updated)</p>
  </li>
  <li><p>To see changes on the web I always have to open the site in anonymous window. Even Ctrl+F5, Ctrl+Shift+R in Chrome does not help.</p>
  </li>
  </ol>