Canada Post is a premium shipping method that allows you get shipping rates from Canada Post’s API. It requires that your store use Canadian Dollars as its currency and your server has SimpleXML installed. The extension primarily works with cm and kg, but other units can be converted automatically.
Canada Post handles both domestic and international parcels.
Installation
↑ Back to top- Download the .zip file from your WooCommerce account.
- Go to: WordPress Admin > Plugins > Add New to upload the file you downloaded with Choose File.
- Activate the extension.
More information at: Installing and Managing Plugins.
Getting Started
↑ Back to topThe first step is to link your Canada Post account. A notification at the top of the admin screen will remind you to Register/Connect:
- Click the Register/Connect button to be taken to Canada Post’s website.
- Log into your account or register as a new user to allow Woo to get shipping quotes from the API on your behalf.
- Canada Post may request that you enter a credit card for future automatic transactions, such as monthly fees, transaction fees, etc. You can change or update it later when you sign into My Business Profile on the Canada Post dashboard.
You should be sent to the admin panel upon completion. If you want to disconnect your account in the future, click the link at top of the Settings page under WooCommerce > Settings > Shipping > Canada Post:
Setup and Configuration
↑ Back to topNote:
This shipping method has to be added to a Shipping zone. If you haven’t configured your Shipping zones yet, please check our Setting up Shipping Zones guide before proceeding.
- Go to WooCommerce > Settings > Shipping > Shipping zones.
2. Click the Edit button on the shipping zone where you want to offer this method.
3. Inside the shipping zone, click the Add shipping method button.
4. Then, select the shipping method and click the Continue button.
- Click the Edit button on the right side of the Shipping methods table to configure the settings:
- Method Title – Enter a description, which is shown to customers in checkout.
- Origin Postcode – This should be set to the postcode of the location from where you ship. It’s sent to the API to calculate rates.
- Quote Type – Commercial uses rates and discounts associated with your account; also used for VentureOne members (for details, see Canada Post Business Services). Select Counter to get regular rates you’d receive in person.
- Rate Cost – Base cost is the base rate cost. Due cost is the cost after taxes are applied.
- Lettermail – Use the dropdown to select Standard and/or Registered rates. Lettermail isn’t part of the Canada Post API, and rates are calculated using box packing and hardcoded prices. Note that there’s a 500g weight limit for Lettermail parcels; if the total weight of multiple items in the cart exceeds 500g with Lettermail enabled, the Canada Post extension will return a Lettermail rate for multiple parcels. For service details, see Lettermail.
- Additional Options – Use the dropdown to add insurance Coverage, Proof of Age and/or Signature required for parcels.
- Delivery Time – Tick the checkbox if you want a delivery estimate (in days) displayed next to rates. The estimate will be provided from the API.
- Parcel Packing Method – Use the dropdown to select Pack Individually, Weight of All Items or Pack with Weights and Dimensions (explanation below).
- Offer Rates – Use the dropdown to select All Rates (customer chooses) or Cheapest Rate (customer sees only one rate).
- Services – Rename and re-order Canada Post shipping rates, and add price adjustments as a percentage or by dollar amount. Adjustments can be positive (surcharge/fee) or negative (discount).
Parcel Packing Methods
↑ Back to topThere are three packing methods with Canada Post — each affects parcels you send to the API for rate quotes.
Per-Item
↑ Back to topEach item in your cart (non-virtual) is sent to the Canada Post API. Quotes for all items are combined for the final cost.
Weight Based
↑ Back to topMaximum parcel weight is 30kg for shipping within Canada, to the USA and International. The cart can be split into multiple 30kg maximum parcels, with each parcel sent to the API. No dimensions are sent, only weight.
Pack into boxes
↑ Back to topItems are packed in pre-defined boxes and sent to the API. We recommend this option. See Box-Packing for more information.
Box Packing
↑ Back to topThe box packer included with this shipping method lets you group items into packages in which you define height, width, length, weight and max-weight. Packing is primarily volume based, but also considers item sizes.
Setting up box sizes
↑ Back to topWithin Settings, go to the Box setting. Click Add Box to set up the box dimensions:
Outer dimensions are used for parcel dimensions and passed to the API.
Inner dimensions are used for packing, and items must fit within them.
Box weight is the weight of the actual box, and is added to the weight of contents. This increases the cost of shipping.
Max weight is the maximum weight your box can hold. This includes content weight and box weight.
How the calculation works
↑ Back to topThe packer does the following:
- Finds boxes that fit the items being packed, using H x W x D.
- Packs all items fitting into boxes, using volume.
- Uses smallest box that fits 100% of items; or uses highest % packed box, and then returns unpacked items and repeats the process.
- Packs ‘unpackable’ items alone, using item dimensions.
- Returns all packed boxes.
Usage
↑ Back to topCustomers get quotes from two places after inputting their address:
- Cart page – using the shipping calculator
- Checkout page – by filling in shipping and billing forms
API and Debug
↑ Back to topGo to: WooCommerce > Settings > Shipping > Canada Post.
- Connect/Disconnect your Canada Post Account
- Debug Mode – Tick the checkbox to log API requests and responses for the cart and checkout pages. Useful for troubleshooting.
Troubleshooting
↑ Back to topNo rates returned/no rates available
↑ Back to top- Ensure that you have connected your production Canada Post account.
- Enable development mode, or turn on WP_DEBUG to see debugging information on the cart page. This often reveals the issue.
- Check that products have sizes and weights set – without this, the calculation cannot be performed.
- Check that your store’s base country is Canada and has Canadian Dollars set as the currency (WooCommerce > Settings > General).
No rates due to “Rejected by SLM Monitor” error
↑ Back to topThis error is generally the result of an outage or maintenance being done by Canada Post. You can check the status of their services here, but this should be a temporary issue.
After attempting to authorize Canada Post, it brings me back to a page with a number 1 on the top left
↑ Back to topYou may need to update your permalink settings for WordPress to Pretty Permalinks.
Why are my lookups timing out?
↑ Back to topTry opening Port 30000 for API communications.
Error message in cart: Fatal error: Cannot use object of type WP_Error as array in ../woocommerce-shipping-canada-post/shipping-canada-post.php
You see this error message if your server is unable to use the wp_remote_get() function. This can be verified using the Status Report:
In this case, we recommend contacting your hosting company so they update your server.
Frequently Asked Questions
↑ Back to topI can’t get get DOM.EP rate returned. Why?
↑ Back to topDOM.EP (Expedited) rate is available only if Quote Type selected is Commercial:
Due to the nature of services provided by Canada Post, DOM.EP rate is not available over-the-counter at the Canada Post office and as a result, in the plugin as well.
Does this plugin calculate rates according to the type of Canada Post account I have?
↑ Back to topYes, it does. When a plugin uses an API, it’s pulling in rates specific to the different accounts and types of services available as set up by Canada Post.
Questions and Feedback
↑ Back to topHave a question before you buy? Please fill out this pre-sales form.
Already purchased and need some assistance? Get in touch with a Happiness Engineer via the Help Desk.