// Hook to restrict shipping based on product and destination postcode add_filter('woocommerce_package_rates', 'restrict_shipping_by_product_and_postcode', 10, 2); function restrict_shipping_by_product_and_postcode($rates, $package) { // Replace '123456' with the postcode of Lucknow $lucknow_postcode = '226022'; // Check if the destination postcode is different from Lucknow if ($package['destination']['postcode'] != $lucknow_postcode) { // Check if there are restricted products in the cart $restricted_products = array(9651); // Replace with the IDs of the restricted products foreach ($package['contents'] as $item_id => $values) { $product_id = $values['product_id']; if (in_array($product_id, $restricted_products)) { // If any restricted product is found, unset all shipping methods $rates = array(); break; } } } return $rates; }{"id":504,"count":48,"description":"Ram Asrey\u2019s very popular dry fruits sweets or mithai is a must have delicacy. These kaju pista badam sweets have become a tradition for every festival. Be it Diwali, Holi or Rakshabandhan. Suitable for all occasions and celebrations round the year.[expand title='Continue reading']\r\nBesides, these sweets have many health benefits as well.\r\n\r\nCashews are one of the lowest-fiber nuts. They are packed with vitamins, minerals and antioxidants.\r\n\r\nPistachios help maintain a healthy heart and for weight management. Protect against sugar and bp. Also improves digestion.\r\n\r\nAlmonds delivers a massive amount of nutrients. High Vitamin E content. Assists with blood sugar control and benefits blood pressure levels. In addition to this it also helps lower cholesterol levels.[\/expand]","link":"https:\/\/www.ramasrey.com\/product-category\/pan-india-delivery\/kaju-pista-badam-sweets-ind\/","name":"KAJU PISTA BADAM SWEETS -IND","slug":"kaju-pista-badam-sweets-ind","taxonomy":"product_cat","parent":491,"meta":[],"yoast_head":"\n