=== Wildrobot ===
Contributors: robertosnap  
Donate link: https://wildrobot.no/  
Tags: woocommerce, shipping, freight, logistics, checkout  
Requires at least: 5.1
Tested up to: 6.8
Requires PHP: 7.4  
Stable tag: 1.4.6
WC requires at least: 3.0.0
WC tested up to: 9.8.1
License: GPLv2 or later  
License URI: https://www.gnu.org/licenses/gpl-2.0.html  

WooCommerce shipping integration with Wildrobot.

== Description ==

Wildrobot is a WooCommerce extension that lets you fully control your shipping options.
With this plugin, you can define shipping rules based on shipping classes, user roles, order weight, and total amount.
Let customers choose pickup points at checkout.
It integrates seamlessly with WooCommerce.

== Installation ==

1. Upload the plugin to the `/wp-content/plugins/` directory.
2. Activate the plugin through the 'Plugins' menu in WordPress.
3. Navigate to WooCommerce > Settings > Shipping and configure the Wildrobot method.

== External services ==

This plugin connects to the Wildrobot API (https://api.wildrobot.no) — operated by Wildrobot — to provide its freight-shipping functionality. The API is contacted on the following occasions:

* When a customer views the cart or checkout and a Wildrobot shipping method is enabled: the destination postcode, country and parcel weight are sent so the API can return shipping rates and available pickup points.
* When the store admin sends an order through Wildrobot: the order's shipping address, parcel details and selected pickup point are sent so the API can create a consignment, return a tracking number and a shipping label (PDF).
* When the plugin verifies the configured API key: the API key is sent to confirm the account is valid.

No data is sent unless the store admin has entered an API key in the plugin settings and a shipping method has been enabled. The plugin does not transmit analytics or usage data.

Provider: Wildrobot — https://wildrobot.no
Terms of service: https://wildrobot.no/terms
Privacy policy: https://wildrobot.no/privacy

== Changelog ==

= 1.4.6 =
* Improvement: Pickup points at checkout are looked up once per postcode instead of after every edit of the street line, so the chosen pickup point stays put while the customer types and dev, staging and live shops all use far fewer lookups. Shops with both Bring and PostNord pickup methods at the same postcode now always get each carrier's own points.
* Fix: After returning from the payment page, the Billing tab only says "Subscription started" once the subscription is confirmed; until then it shows a "Confirming your subscription" card, and if confirmation does not arrive it explains this and offers a "Check again" button instead of a false welcome.
* Fix: With debug logging on, shipping calculations no longer write the customer's street address and the whole cart to the WooCommerce logs; each calculation logs one compact line per shipping method under the wildrobot-shipping log, so debug logs stay small and readable.

= 1.4.5 =
* Fix: Links to a specific WildRobot tab (for example the Billing tab after returning from the payment page) now open that tab, and the admin page never shows a hidden registration form that could replace a working key.
* Improvement: The Return Address card checks the address before saving: country is chosen from a list, address, postcode and city are required once you fill anything in, and invalid emails, phone numbers or postcodes are pointed out under the field instead of being saved or dropped silently.
* Fix: On phone-width screens, changing the Profrakt key on the Shipping Carriers tab no longer pushes the page off the screen; the key field keeps its full width and the Cancel button stays visible.

= 1.4.4 =
* Fix: The Override drawer shows real carrier prices for each product (your net price next to the list price) and asks the carrier once per agreement; after changing packages or the postcode you refresh the prices on demand instead of after every keystroke.
* Fix: On orders without a WildRobot shipping method, the Override drawer no longer pre-selects a carrier product silently; it explains why and Send Override stays disabled until you choose one.
* Improvement: Clearing the API key on the Advanced tab asks for confirmation and explains the consequences, and a pasted key is checked with WildRobot before it replaces the working one.
* Fix: The "No pickup point selected" warning on the order page only appears for shipping methods that offer pickup points, and shows why the customer could not choose one.

= 1.4.3 =
* Improvement: Checkout shipping rates load faster: carrier prices are cached for ten minutes and all shipping methods of a zone are priced in one carrier request, so a street-address edit or a repeated calculation no longer waits for the carrier.
* Improvement: New Order Automation rules start switched off and must name a shipping method; automatic sends run in the background and a failed send is shown on the order instead of failing silently.
* Fix: The default package weight is applied at checkout when products have no weight, and weightless products are listed in WildRobot settings instead of shipping at a made-up price.
* Fix: The PostNord shipping method templates now match a Norwegian PostNord agreement, so the PostNord cards are no longer greyed out as "Needs agreement".
* Fix: The Profrakt API key and the account owner's contact details are no longer included in the admin page HTML or in REST responses.
* Fix: Cancelling a Profrakt key change in the Carriers tab keeps the saved carrier settings, and saving with an empty sender list is refused with a message.

= 1.4.2 =
* New: Send and Override buttons in a WildRobot box on the order edit page.
* New: The chosen pickup point is shown on the order-received page and in order emails.
* Improvement: The pickup point selector shows loading, error and empty states, and Place Order is held while a required pickup point is missing.
* Fix: Checkout is never blocked when pickup points cannot be looked up: methods that require a pickup point are hidden instead, and the merchant sees a notice with the reason.
* Fix: The shipping Cost field is validated on save, and [qty] / [cost] formulas are calculated like WooCommerce Flat Rate.
* Fix: Shipping method settings are validated on save: negative amounts, reversed weight ranges, blank titles and invalid postcode rules are rejected with a clear message instead of hiding the method or making it free.
* Fix: Shipping methods created from a template are priced from your carrier agreement instead of shipping for free.
* Fix: The WildRobot admin pages show their intended theme: primary buttons, alerts and error/success messages are coloured again.

= 1.4.1 =
* Improvement: New plugin listing branding — banner, icon and up-to-date screenshots.

= 1.4.0 =
* New: Pickup point selection and validation in the WooCommerce block checkout (the default checkout since WooCommerce 8.3).
* Fix: The plugin always talks to the production WildRobot API unless a backend URL is explicitly configured, regardless of WP_ENVIRONMENT_TYPE.
* Fix: Pickup point lookups no longer fail after the May backend update (quota handling).

= 1.1.0 =
* New: Postcode-based shipping restrictions for shipping methods.
* Improvement: Updated project documentation.

= 1.0.11 - 1.0.41 =
* Various bug fixes and stability improvements.
* Compatibility fixes for the WordPress Plugin Check tool.
* Internationalization (i18n) string escaping fixes.

= 1.0.9 - 1.0.10 =
* Added screenshots and improved README.

= 1.0.8 =
* Initial stable release.

== Frequently Asked Questions ==

= Does this plugin require a Wildrobot account? =
Yes, an API key from Wildrobot is required to use the shipping integration. Visit https://wildrobot.no to learn more.

== Screenshots ==

1. Pickup point selection in the WooCommerce checkout — customers pick a nearby Bring, PostNord or Helthjem pickup point.
2. WildRobot settings page in WordPress admin.
3. Shipping method settings — choose carrier product, pickup point behaviour and pricing per method.
4. Order list with WildRobot actions — send orders to the carrier and print labels without leaving WooCommerce.

== Upgrade Notice ==

= 1.1.0 =
Adds postcode-based shipping restrictions.
