=== FreightPOP ===
Contributors: FreightPOP
Tags: FreightPOP, WooCommerce, Shipping, Integration, Real-time Shipping
Requires at least: 5.6
Tested up to: 7.0
Requires PHP: 7.4
Requires Plugins: woocommerce
Stable tag: 1.1.4
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html

The FreightPOP integration plugin for WooCommerce provides real-time shipping quotes directly from FreightPOP. 

== Description ==
The FreightPOP integration plugin for WooCommerce provides real-time shipping quotes directly from FreightPOP. It allows store owners to connect their WooCommerce store to FreightPOP, enabling the retrieval of accurate shipping rates based on various configurations. The plugin supports options for applying markups or discounts to shipping rates and the ability to display base or list rates.

== Installation ==
1. Install and activate the FreightPOP integration plugin in WooCommerce.
2. Open the plugin from the WordPress dashboard.

== Configuration ==
1. **Connect to FreightPOP**:
   - Use your FreightPOP credentials to log in.
   - Source: Production

2. **General Settings**:
   - Set your Product Settings and select the Rates to Display (e.g., cheapest, fastest).
   - Save the settings.

3. **Shipping Rate Settings**:
   - Configure markup or discount options to modify shipping rates as needed.

4. **Rate Conditions**:
   - Set conditions for Base Rate (standard) and List Rate (with additional fees).

5. **Store Shipping Settings**:
   - Navigate to WordPress Admin.

== Testing Instructions ==
1. Test the checkout page by entering a shipping address to ensure FreightPOP rates are displayed accurately.
2. Validate the display of shipping options based on base or list rates and applied conditions (markup/discount).
3. Document any issues found during testing.

== Changelog ==
* 1.1.4 - The shipper address now sends a Company value, which some broker carriers require before they will return small parcel rates. Shipping rate rows on the cart and checkout lay the label and price out in separate columns so long carrier names no longer overlap the price. The minimum WordPress requirement is lowered from 6.5 to 5.6, because the WordPress.org update API withholds updates entirely from sites below a plugin's declared minimum, which left sites on WordPress older than 6.5 unable to see any update.
* 1.1.3 - The shipper address now sends a Company value, which some broker carriers require before they will return small parcel rates. Shipping rate rows on the cart and checkout lay the label and price out in separate columns so long carrier names no longer overlap the price.
* 1.1.2 - Shipping addresses now send the customer's company when provided, falling back to the billing company and then the recipient name instead of a placeholder. Long carrier and service rate labels wrap on the cart and checkout pages.
* 1.1.1 - Added shipping-zone instance settings, safe upgrades from 1.0, package-specific rate calculation, sandbox API support, safer caching and API failures, corrected discount conditions, and credential-handling improvements.
* 1.1.0 - Updated for WordPress 7.0 compatibility, PHP 7.4+ metadata, WooCommerce dependency handling, prefixed database tables, and safer admin AJAX access.
* 1.0 - Initial release of the FreightPOP integration plugin for WooCommerce.

== Upgrade Notice ==
= 1.1.4 =
Sends a company name with the shipper address so broker small parcel rates are returned, and fixes long rate labels overlapping the price. Also lowers the minimum WordPress version to 5.6 so sites on WordPress below 6.5 are offered plugin updates again. No settings or database changes.

= 1.1.3 =
Sends a company name with the shipper address so broker small parcel rates are returned, and fixes long rate labels overlapping the price. No settings or database changes.

= 1.1.2 =
Corrects the company name sent with shipping addresses and fixes wrapping of long shipping rate labels. No settings or database changes.

= 1.1.1 =
This update migrates the version 1.0 plugin entry point, settings, and pricing rules while preserving activation. Test shipping quotes on staging before updating a production store.

== Frequently Asked Questions ==

= What credentials are needed to connect to FreightPOP? =
You will need FreightPOP credentials, including the source, username, and password, provided during the setup process.

= Can I apply a markup or discount to shipping rates? =
Yes, the plugin allows you to apply a percentage or flat markup/discount to modify shipping rates.

= How do I configure which rates to display? =
You can choose the shipping rates (e.g., cheapest, fastest) from the General Settings section within the plugin.

== Third-Party Services ==

This plugin integrates with FreightPOP, a third-party shipping service that provides shipping rate calculations and shipment details.

=== How This Plugin Uses FreightPOP ===

- **Service Utilization**: The plugin sends shipping-related data to FreightPOP to calculate shipping rates and obtain shipment details based on the items in the user's cart.
- **When Requests Are Sent**: Requests are sent when an administrator connects the plugin to FreightPOP and whenever WooCommerce calculates shipping options for a cart or checkout package.
- **Service Endpoints**: Production requests use `https://enterprise.freightpop.com`; sandbox requests use `https://sandbox-api.freightpop.com`.
- **Data Sent**: The following data is transmitted to FreightPOP:
  - FreightPOP username and password during the connection request. The password is not retained by the plugin after authentication.
  - Origin and destination address information, which may include the recipient name, email address, and phone number when available.
  - Cart product names, descriptions, SKUs, quantities, prices, weights, and dimensions as required to pack the shipment and calculate rates.

=== Links ===

- **FreightPOP Service**: [FreightPOP](https://www.freightpop.com)
- **Terms of Use**: [FreightPOP Terms of Use](https://www.freightpop.com/terms)
- **Privacy Policy**: [FreightPOP Privacy Policy](https://www.freightpop.com/privacy)

By using this plugin, you acknowledge that data may be sent to FreightPOP in accordance with their privacy policy.
