Progressus-io / postnl-for-woocommerce

GNU General Public License v3.0
3 stars 0 forks source link

fixed currencies not available and insurance limit #155

Closed ferroche90 closed 7 months ago

ferroche90 commented 7 months ago

Title: Implement Insurance Limit Checks and Currency Utility Update

Description: This pull request introduces two updates to the codebase:

  1. Insurance Limit Checks for Shipments:

    • Added a protected function check_insurance_amount_limit to validate insurance amounts for EU and non-EU shipments.
    • For non-EU shipments, the insured amount is set to €500 if insurance is selected and the order total exceeds €5000.
    • For EU shipments, an exception is thrown if insurance is selected and the order total exceeds €5000, enforcing the maximum allowed insurance amount.
  2. Currency Utility Enhancement:

    • Updated the get_available_currency() function to include all WooCommerce currencies.

Files Changed: