Woocommerce USPS Shipping Plugin and First Class / Ground Advantage
-
Starting this month, USPS stopped offering First Class and switched to a new product called Ground Advantage.
https://www.usps.com/ship/ground-advantage.htm
The USPS Shipping plugin for Woocommerce was not updated to accomodate that and starting today, stopped returning first class prices.
I reached out to Woo Support, but it’s a weekend, so that was not super fruitful. If you are brave, I have a solution until the plugin is updated.
Basically, you need to add the shipping ID from the USPS API to the file in the plugin that determines which quotes are valid ones for it to provide to Woo/user.
The first chunk of the following file deals with First Class. If you add the last, bolded ground advantage line, it will allow the plugin to work.
/wp-content/plugins/woocommerce-shipping-usps/includes/data/data-services.php
<?php /** * USPS Services and subservices */ return apply_filters( 'wc_usps_services', array( // Domestic ??? 'D_FIRST_CLASS' => array( ?? ???? // Name of the service shown to the user ?? ???? 'name'? => 'First-Class Mail®', ?? ???? // Services which costs are merged if returned (cheapest is used). This gives us the best possible rate. ?? ???? 'services' => array( ?? ???? ??? '0'? => array( ?? ???? ??? ??? 'first-class-mail-large-envelope'??? => 'First-Class Mail® Large Envelope', ?? ???? ??? ??? 'first-class-mail-postcards'???????? => 'First-Class Mail® Postcards', ?? ???? ??? ??? 'first-class-mail-stamped-letter'??? => 'First-Class Mail® Stamped Letter', ?? ???? ??? ??? 'first-class-package-service-retail' => 'First-Class Package Service - Retail™', ?? ???? ??? ), ?? ???? ??? '12' => 'First-Class™ Postcard Stamped', ?? ???? ??? '15' => 'First-Class™ Large Postcards', ?? ???? ??? '19' => 'First-Class™ Keys and IDs', ?? ???? ??? '61' => 'First-Class™ Package Service', ?? ???? ??? '78' => 'First-Class Mail® Metered Letter', '1058' => 'USPS Ground Advantage;', ), ?? ?),
- The topic ‘Woocommerce USPS Shipping Plugin and First Class / Ground Advantage’ is closed to new replies.