Linux 软件免费装
Banner图

City Based Shipping for Bangladesh

开发者 iamovk
更新时间 2025年11月30日 03:49
PHP版本: 7.4 及以上
WordPress版本: 6.8
版权: GPL2 or later
版权网址: 版权信息

标签

shipping woocommerce checkout bangladesh rates

下载

1.0.1

详情介绍:

City Based Shipping for Bangladesh provides an easy way to configure different flat rate shipping costs for customers inside Dhaka and those elsewhere in Bangladesh. Simply set up two WooCommerce Flat Rate methods in your shipping zone (one for Dhaka and one for outside Dhaka) and then configure their instance IDs and labels on the plugin settings page. The plugin will hide the wrong rate at checkout and can even override the cost and label displayed. City and state field changes update totals in real time thanks to a small JavaScript helper.

安装:

  1. Upload the plugin files to the /wp-content/plugins/ directory or install it directly through the WordPress plugin installer.
  2. Activate the plugin through the 'Plugins' screen in WordPress.
  3. Go to WooCommerce → Settings → Shipping and ensure you have a Flat Rate for Dhaka and another for outside Dhaka. Note the instance IDs shown in the URL when editing each method.
  4. Navigate to WooCommerce → City Based Shipping and enter:
  5. The labels of your Dhaka and outside Dhaka shipping methods.
  6. The instance IDs (optional but recommended for reliable matching).
  7. Optionally, override costs for each rate if you wish to ignore WooCommerce flat rate settings.
  8. Save changes. Shipping options will now automatically adjust based on the customer’s selected city/state in checkout.

屏幕截图:

  • Checkout page automatically showing the correct rate based on the selected city.

升级注意事项:

1.0.1 This update aligns the plugin slug and text domain with WordPress.org expectations, adds a license header, and bumps the tested up to version.

常见问题:

Where do I find the method instance IDs?

When editing a Flat Rate method in WooCommerce, look at the URL in your browser. It will contain instance_id=123. Use that number in the plugin settings for the corresponding rate.

Does this work with City dropdowns instead of text inputs?

Yes. The included JavaScript listens for changes on both text inputs and dropdowns, including those enhanced with Select2.

Can I use this plugin for countries other than Bangladesh?

The plugin’s detection logic is tailored to Bangladesh. It identifies Dhaka using the ISO 3166‑2 code BD-13 (or just 13) and by matching the city name (English and Bangla). If you wish to adapt the plugin for other locales, you can fork it and adjust the is_destination_dhaka() method.

更新日志:

1.0.1 1.0.0