<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>USPS Shipping Method - CODIBU</title>
	<atom:link href="https://help.codibu.com/kbtopic/usps-shipping-method/feed/" rel="self" type="application/rss+xml" />
	<link>https://help.codibu.com</link>
	<description>Hosting &#38; Domain,  Development &#38; Design, SEO &#38; Marketing, 2300+ Themes &#38; Plugins, Free SEO analysis &#38; tools</description>
	<lastBuildDate>Sun, 08 Nov 2020 15:44:48 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	

<image>
	<url>https://help.codibu.com/wp-content/uploads/2022/07/favicon.png</url>
	<title>USPS Shipping Method - CODIBU</title>
	<link>https://help.codibu.com</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>USPS Shipping Method</title>
		<link>https://help.codibu.com/blog/usps-shipping-method/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=usps-shipping-method</link>
					<comments>https://help.codibu.com/blog/usps-shipping-method/#respond</comments>
		
		<dc:creator><![CDATA[JN C]]></dc:creator>
		<pubDate>Sun, 08 Nov 2020 15:44:48 +0000</pubDate>
				<guid isPermaLink="false">https://help.codibu.com/kb/usps-shipping-method/</guid>

					<description><![CDATA[<p>USPS Shipping is a premium method that sources shipping rates from the USPS API and works with our free service WooCommerce Shipping, which creates discounted shipping labels right from<span class="excerpt-hellip"> […]</span></p>
<p>The post <a href="https://help.codibu.com/blog/usps-shipping-method/">USPS Shipping Method</a> first appeared on <a href="https://help.codibu.com">CODIBU</a>.</p>]]></description>
										<content:encoded><![CDATA[<p><a href="https://help.codibu.com/blog/kb/usps-shipping-method/" rel="noopener noreferrer">USPS Shipping</a> is a premium method that sources shipping rates from the USPS API and works with our free service <a href="https://help.codibu.com/blog/kb/save-time-money-with-woocommerce-shipping/" rel="noopener noreferrer">WooCommerce Shipping</a>, which creates discounted shipping labels right from your WooCommerce dashboard.</p>
<p>USPS can calculate domestic and international parcel rates. This extension uses 2019 rates.</p>
<div class="woo-sc-box note   ">The API and built-in box packer need your non-virtual products to have weights and dimensions set. More info at: <a href="https://help.codibu.com/blog/kb/adding-shipping-dimensions-to-products/">Adding Shipping Dimensions to Products</a>.</div>
<h2 id="section-1">Requirements</h2>
<ul>
<li>Your store must use <strong>US Dollars</strong> as its currency</li>
<li>Server must have SimpleXML installed. Check with your hosting company if you’re unsure</li>
<li>Base country must be the <strong>United States, Puerto Rico or US Virgin Islands</strong></li>
</ul>
<p>The extension primarily works with measurements in <strong>Inches (in)</strong> and weight in <strong>Pounds (lbs)</strong>, but other units can be converted automatically.</p>
<h2 id="section-2">Installation</h2>
<ol>
<li>Download the extension from your <a href="http://woocommerce.com/my-account/downloads/">WooCommerce dashboard.</a></li>
<li>Go to <strong>Plugins &gt; Add New &gt; Upload</strong> and select the ZIP file you just downloaded.</li>
<li><strong>Install Now</strong>, and then Activate.</li>
</ol>
<h2 id="section-3">API &amp; Debug</h2>
<p><strong>Go to</strong>: <strong>WooCommerce &gt; Settings &gt; Shipping &gt; USPS</strong>.</p>
<ol>
<li><strong>USPS User ID</strong> – You can use our USPS User ID (this is set automatically) or sign up for your own at Webtools account on USPS.com.</li>
<li><strong>Debug Mode </strong>– Enable debug mode to show debugging info on your cart/checkout. This information is shown only to administrators who are logged in.</li>
</ol>
<h2 id="section-4">Setup and Configuration</h2>
<ol>
<li><strong>Go to</strong>: <strong>WooCommerce &gt; Settings &gt; Shipping &gt; Shipping Zones</strong>.</li>
<li><strong>Add </strong>new Shipping Zone or <strong>Edit</strong> an existing zone to add the shipping method.<br />
<a href="https://help.codibu.com/wp-content/uploads/2020/11/usps-add-method.png"><img fetchpriority="high" decoding="async" class="aligncenter size-full wp-image-10771" src="https://help.codibu.com/wp-content/uploads/2020/11/usps-add-method.png" alt="" width="950" height="426" /></a></li>
<li>Select <strong>USPS</strong> from the dropdown, then <strong>Add shipping method</strong>.<br />
<a href="https://help.codibu.com/wp-content/uploads/2020/11/select-usps.png"><img decoding="async" class="aligncenter size-full wp-image-10738" src="https://help.codibu.com/wp-content/uploads/2020/11/select-usps.png" alt="" width="1064" height="660" /></a></li>
<li><strong>Configure</strong> the settings:
<ul>
<li><strong>Method Title </strong>– Name the shipping method. This is visible to customers.</li>
<li><strong>Offer Rates</strong> – Choose whether to offer the customer only the cheapest rate or all returned rate options.</li>
<li><b>Fallback</b> – Enter a fallback shipping cost (optional), if no rates are returned from the API. This allows the customer to check out if USPS does not return matching rates. When using this option, do not use a dollar sign, just enter the amount (ex: 12.50).</li>
<li> <strong>Flat Rates</strong>
<ol>
<li><strong>Flat Rate Boxes and Envelopes</strong> – Enable this option to offer shipping using USPS Flat Rate services. Items are packed into the boxes/envelopes, and the customer is offered a single rate.</li>
<li><strong>Express Flat Rate Title</strong> – Give a custom name to the express flat rate.</li>
<li><strong>Priority Flat Rate Title</strong> – Give a custom name to the priority flat rate.</li>
<li><strong>Additional Fee</strong> – Enter a fee per box excluding tax, such as an amount (2.50) or a percentage (5%). Or leave blank to disable.</li>
</ol>
</li>
<li> <b>API Rates </b>– Check to enable non-flat rates using the USPS API. Default is all services available; or choose what to offer from the available shipping services listed below. You can adjust:
<ol>
<li><strong>Enable API Rates</strong> – This enables non-flat rate services.</li>
<li><strong>Origin Postcode</strong> – Postcode from where you ship. It is sent to the USPS API.</li>
<li><strong>Shipping Rates</strong> – Retail rates are standard costs, Commercial rates are discounted. If you want those rates to match those you get when printing labels with <a href="https://help.codibu.com/blog/kb/save-time-money-with-woocommerce-shipping/" rel="noopener noreferrer">WooCommerce Shipping</a>, set it to “Commercial rates”. Printing with WooCommerce Shipping automatically qualifies you for Commercial rates.</li>
<li><strong>Parcel Packing Method</strong> – See below for more detailed explanation.</li>
</ol>
</li>
</ul>
</li>
</ol>
<div class="woo-sc-box note   "><strong>Note:</strong> The USPS shipping extension is a calculator for all products in the cart and does not exclude products based on shipping classes. To exclude products from using the USPS shipping method, use <a href="https://help.codibu.com/blog/kb/conditional-shipping-and-payments/">WooCommerce Conditional Shipping and Payments</a> extension.</div>
<h2 id="section-5">Available Shipping Services</h2>
<p>These services are included with the USPS Shipping extension:</p>
<p><strong>Domestic</strong></p>
<ul>
<li>First-Class Mail® Large Envelope</li>
<li>First-Class Mail® Postcards</li>
<li>First-Class Mail® Stamped Letter</li>
<li>First-Class Package Service – Retail<img src="https://s.w.org/images/core/emoji/14.0.0/72x72/2122.png" alt="™" class="wp-smiley" style="height: 1em; max-height: 1em;" /></li>
<li>First-Class<img src="https://s.w.org/images/core/emoji/14.0.0/72x72/2122.png" alt="™" class="wp-smiley" style="height: 1em; max-height: 1em;" /> Postcard Stamped</li>
<li>First-Class<img src="https://s.w.org/images/core/emoji/14.0.0/72x72/2122.png" alt="™" class="wp-smiley" style="height: 1em; max-height: 1em;" /> Large Postcards</li>
<li>First-Class<img src="https://s.w.org/images/core/emoji/14.0.0/72x72/2122.png" alt="™" class="wp-smiley" style="height: 1em; max-height: 1em;" /> Keys and IDs</li>
<li>First-Class<img src="https://s.w.org/images/core/emoji/14.0.0/72x72/2122.png" alt="™" class="wp-smiley" style="height: 1em; max-height: 1em;" /> Package Service</li>
<li>First-Class Mail® Metered Letter</li>
<li>First-Class<img src="https://s.w.org/images/core/emoji/14.0.0/72x72/2122.png" alt="™" class="wp-smiley" style="height: 1em; max-height: 1em;" /> Package Service Hold For Pickup</li>
<li>Priority Mail Express<img src="https://s.w.org/images/core/emoji/14.0.0/72x72/2122.png" alt="™" class="wp-smiley" style="height: 1em; max-height: 1em;" /> Hold for Pickup</li>
<li>Priority Mail Express<img src="https://s.w.org/images/core/emoji/14.0.0/72x72/2122.png" alt="™" class="wp-smiley" style="height: 1em; max-height: 1em;" /></li>
<li>Priority Mail Express<img src="https://s.w.org/images/core/emoji/14.0.0/72x72/2122.png" alt="™" class="wp-smiley" style="height: 1em; max-height: 1em;" /> Sunday/Holiday</li>
<li>Retail Ground<img src="https://s.w.org/images/core/emoji/14.0.0/72x72/2122.png" alt="™" class="wp-smiley" style="height: 1em; max-height: 1em;" /></li>
<li>Media Mail®</li>
<li>Library Mail</li>
<li>Priority Mail®</li>
<li>Priority Mail® Keys and IDs</li>
<li>Priority Mail® Hold For Pickup</li>
<li>Priority Mail® Regional Rate Box A (when commercial rates are used)</li>
<li>Priority Mail® Regional Rate Box B (when commercial rates are used)</li>
</ul>
<h4 id="international">International</h4>
<ul>
<li>Priority Mail Express International<img src="https://s.w.org/images/core/emoji/14.0.0/72x72/2122.png" alt="™" class="wp-smiley" style="height: 1em; max-height: 1em;" /></li>
<li>Priority Mail International®</li>
<li>Global Express Guaranteed® (GXG)</li>
<li>Global Express Guaranteed® Document</li>
<li>Global Express Guaranteed® Non-Document Rectangular</li>
<li>Global Express Guaranteed® Non-Document Non-Rectangular</li>
<li>USPS GXG<img src="https://s.w.org/images/core/emoji/14.0.0/72x72/2122.png" alt="™" class="wp-smiley" style="height: 1em; max-height: 1em;" /> Envelope</li>
<li>First Class Mail® International Letters</li>
<li>First Class Mail® International Large Envelope</li>
<li>International Postcards</li>
</ul>
<p><strong>Flat Rate Shipping Options</strong></p>
<ul>
<li>Priority Mail Flat Rate<img src="https://s.w.org/images/core/emoji/14.0.0/72x72/2122.png" alt="™" class="wp-smiley" style="height: 1em; max-height: 1em;" /> – Envelopes (Legal, Letter, Gift Card, Padded, Small, Window) and Boxes (Small, Medium 1 and 2, Large, APO/DPO/FPO Large, Large Board Game, Prepaid Forever® Packaging)</li>
<li>Priority Mail Express Flat Rate<img src="https://s.w.org/images/core/emoji/14.0.0/72x72/2122.png" alt="™" class="wp-smiley" style="height: 1em; max-height: 1em;" /> – Envelopes (Envelope, Legal, Padded) and Boxes (Top-Loading, Side-Loading)</li>
<li>Priority Mail International Flat Rate® – Envelopes (Legal, Letter, Gift Card, Padded, Small, Window) and Boxes (Small, Medium 1 and 2, Large, APO/DPO/FPO Large, Large Board Game)</li>
</ul>
<p>To enable any of these options:</p>
<p><strong>Select</strong> the Standard Services option to ‘Retrieve Standard Service rates from the USPS API’.</p>
<p><a href="https://help.codibu.com/wp-content/uploads/2020/11/usps-api.png"><img decoding="async" class="aligncenter size-full wp-image-10772" src="https://help.codibu.com/wp-content/uploads/2020/11/usps-api.png" alt="" width="950" height="211" /></a></p>
<p>You also have the option to rename the service and include a negative/positive price adjustment by the default currency or a percentage.</p>
<ul>
<li><strong>Price adjustments ($)</strong> – Add a flat adjustment to the USPS service.</li>
<li><strong>Price adjustments (%) </strong>– Add a percentage adjustment to the USPS service.</li>
</ul>
<h2 id="section-6">Flat Rate Services</h2>
<p>If enabled, the flat rate box option creates a single quote based on USPS Flat Rate Services. To do this, the system uses the box packer (explained below) applying USPS box dimensions. Packed boxes are then combined to offer a single rate (named by your ‘method title’).</p>
<p>Flat Rate Shipping prices come directly from USPS, and you cannot add or modify pricing for this option.</p>
<p>In the case of both Flat Rates and API Rates are used, USPS will return both but will reject one in favor of the other if it is cheaper for the same service.</p>
<h2 id="section-7">Parcel Packing Method</h2>
<p>There are three packing methods with USPS, and each affects the parcels you send to the API.</p>
<h3 id="section-8">Per-Item</h3>
<p>Each item in your cart (non-virtual) is sent to the USPS API. Quotes for all items are combined to calculate the final cost.</p>
<h3 id="section-9">Pack into boxes</h3>
<p>Items are packed into pre-defined boxes and sent to the API. We recommend this option. See <strong>Box Packing</strong> below for more information.</p>
<h3 id="section-10">Weight based</h3>
<p>Regular sized items (&lt; 12 inches) are grouped and quoted for weights only. Large items ( &gt; 12 inches) are quoted individually.</p>
<h2 id="box-packing">Box Packing</h2>
<p>The box packer included with this shipping method lets you group items into packages for which you define height, width, length, weight and max-weight. Packing is mainly <strong>volume based</strong> but also considers item size.</p>
<div class="woo-sc-box note   ">The box packer is volume based. This provides good results in most cases but are never be as accurate as a real person packing a box (see BIN Packing Problem). Therefore, it is important to understand that packing results are as accurate as possible, and any anomalies should be acceptable.</div>
<h3 id="section-12">Setting up box sizes</h3>
<p>When using the ‘Recommended: Pack into boxes with weights and dimensions’ Parcel Packing Method, the Box Sizes table will appear. Click ‘Add Box’ to set up dimensions for your packages.</p>
<p><strong>Name:</strong> This allows you to name your custom packages. This name will show in the Debug if that package is used.</p>
<p><strong>L (in), W (in), H (in):</strong> The first set of dimensions are the outer dimensions of the package. These are the dimensions passed to the API. If you are working with a flat rate box via the API (i.e., Regional Boxes), use the API’s ‘inner dimensions’ for your box’s outer dimensions. Your box must ‘fit’ inside.</p>
<p><strong>Inner L (in), Inner W (in), Inner H (in):</strong> The second set of dimensions are for the inner dimensions of the packaging. This should be the outer dimensions minus the thickness of the package walls. These dimensions are used for packing and items must fit within them (they cannot be the same size as the products, allow for a little extra room). Inner dimensions must be <strong>smaller</strong> than the first set of dimensions (outer dimensions).</p>
<p><strong>Weight of Box (lbs):</strong> This is the weight of the empty box by itself. This weight is added to the total weight of the contents.</p>
<p><strong>Max Weight (lbs):</strong> This is the maximum weight your box can hold. This includes the weight of the box and the contents. Setting this value as <code>0</code> would mean an unlimited box-weight.</p>
<p><strong>Letter:</strong> This checkbox determines whether your package is a letter (envelope) or a box.</p>
<figure id="attachment_160818" class="wp-caption aligncenter" aria-describedby="caption-attachment-160818"><a href="https://help.codibu.com/wp-content/uploads/2020/11/CustomBoxes.png"><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-10675" src="https://help.codibu.com/wp-content/uploads/2020/11/CustomBoxes.png" alt="" width="1253" height="317" /></a><br /><figcaption id="caption-attachment-160818" class="wp-caption-text">Example packages</figcaption></figure>
<h3 id="section-13">How the calculation works</h3>
<p>The box packer:</p>
<ol>
<li><strong>Finds</strong> boxes that fit items being packed (uses H x W x D).</li>
<li><strong>Packs</strong> all items into boxes (using volume).</li>
<li><strong>Uses</strong> the smallest box fitting 100% of items *or* uses the highest % packed box, and then passes unpacked items back (and repeats the process)</li>
<li><strong>Packs</strong> unpackable items alone, using item dimensions.</li>
<li><strong>Returns</strong> all packed boxes.</li>
</ol>
<h2 id="section-14">Media Mail®</h2>
<p>To enable Media Mail®, you must select the ‘Retrieve Standard Service rates from the USPS API’ option. You then have two options: a) You can do nothing, which allows any item to use Media Mail®; or b) if only some of your products are eligible for Media Mail®, you need to give each product a <a title="Shipping Class Documentation" href="https://help.codibu.com/blog/kb/product-shipping-classes-2/">shipping class</a> and restrict Media Mail® to use only that class or classes.</p>
<p>After setting up shipping classes, you can restrict settings in your Shipping Zone USPS rate:</p>
<p><a href="https://help.codibu.com/wp-content/uploads/2020/11/restrict-media-mail.png"><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-10715" src="https://help.codibu.com/wp-content/uploads/2020/11/restrict-media-mail.png" alt="" width="950" height="178" /></a></p>
<h2 id="section-15">Customer Usage</h2>
<p>Customers can get quotes based on the address entered from two places:</p>
<ul>
<li>Cart page – by using the shipping calculator</li>
<li>Checkout page – by filling in shipping and billing forms</li>
</ul>
<div>Rates can be selected by customers.</div>
<h2 id="section-16">Troubleshooting</h2>
<h3 id="section-17">No rates returned/no rates available</h3>
<ul>
<li>Enable debug mode to see debugging info on the cart page. This often reveals the issue. To enable, go to WooCommerce &gt; Settings &gt; Shipping &gt; USPS.</li>
<li>Check that products have sizes and weights set – without this, the calculation cannot be performed.</li>
<li>Go to: WooCommerce &gt; Settings &gt; General and check that your store’s base country is the United States and US Dollars is the currency.</li>
<li>Check that the plugin is linked to USPS API. It uses wp_remote_post, which makes use of fsockopen/CURL.</li>
<li>If API rate are enabled, make sure origin postcode is included.</li>
</ul>
<p>If you need help with adding weights/dimensions, see:</p>
<h3 id="section-19">Stamped Letter service not available</h3>
<p>If packing items individually, please note the minimum size requirements for the contents of a letter envelope:</p>
<p><a href="https://help.codibu.com/wp-content/uploads/2020/11/Screen-Shot-2020-07-21-at-11.43.09-AM.png"><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-10736" src="https://help.codibu.com/wp-content/uploads/2020/11/Screen-Shot-2020-07-21-at-11.43.09-AM.png" alt="" width="887" height="348" /></a></p>
<p>If the contents of the envelope(the product in the cart) are not within the minimum and maximum dimensions shown above, the Stamped Letter service will not be shown as available.</p>
<h3 id="section-20">“UserName exceeds maximum length of 12 characters” error message</h3>
<p>If you receive this error message when the debug mode is enabled, you need to use a shorter username.</p>
<h2 id="section-21">Customize</h2>
<p class="p1"> </p>
<div class="woo-sc-box note   "><b>Note</b>: This is a <b>Developer level</b> section. If you are unfamiliar with code and resolving potential conflicts, select a <a href="https://woocommerce.com/customizations/"><span class="s2">WooExpert or Developer</span></a> for assistance. We are unable to provide support for customizations under our<span class="Apple-converted-space">  </span><a href="https://help.codibu.com/blog/kb/support-policy/"><span class="s2">Support Policy</span></a>.</div>
<p>&nbsp;</p>
<h3 id="section-22">Filter Flat Rate Services</h3>
<p>To change the USPS package to envelope so dimensions are fixed, add this to your theme’s functions.php file:</p>
<div id="gist87968125" class="gist">
<div class="gist-file">
<div class="gist-data">
<div class="js-gist-file-update-container js-task-list-container file-box">
<div id="file-usps-fixed-package-dimensions-php" class="file my-2">
<div class="Box-body p-0 blob-wrapper data type-php  ">
<table class="highlight tab-size js-file-line-container" data-tab-size="8" data-paste-markdown-skip="">
<tbody>
<tr>
<td id="file-usps-fixed-package-dimensions-php-L1" class="blob-num js-line-number" data-line-number="1"> </td>
<td id="file-usps-fixed-package-dimensions-php-LC1" class="blob-code blob-code-inner js-file-line">/**</td>
</tr>
<tr>
<td id="file-usps-fixed-package-dimensions-php-L2" class="blob-num js-line-number" data-line-number="2"> </td>
<td id="file-usps-fixed-package-dimensions-php-LC2" class="blob-code blob-code-inner js-file-line">* USPS 4.0 introduced the ability for envelopes to be flexible you can disable this with this function</td>
</tr>
<tr>
<td id="file-usps-fixed-package-dimensions-php-L3" class="blob-num js-line-number" data-line-number="3"> </td>
<td id="file-usps-fixed-package-dimensions-php-LC3" class="blob-code blob-code-inner js-file-line">* Simply set the type to &#8216;envelope&#8217; instead of &#8216;package&#8217; for any of the flat rate services that USPS lists as envelopes</td>
</tr>
<tr>
<td id="file-usps-fixed-package-dimensions-php-L4" class="blob-num js-line-number" data-line-number="4"> </td>
<td id="file-usps-fixed-package-dimensions-php-LC4" class="blob-code blob-code-inner js-file-line">*/</td>
</tr>
<tr>
<td id="file-usps-fixed-package-dimensions-php-L5" class="blob-num js-line-number" data-line-number="5"> </td>
<td id="file-usps-fixed-package-dimensions-php-LC5" class="blob-code blob-code-inner js-file-line"> </td>
</tr>
<tr>
<td id="file-usps-fixed-package-dimensions-php-L6" class="blob-num js-line-number" data-line-number="6"> </td>
<td id="file-usps-fixed-package-dimensions-php-LC6" class="blob-code blob-code-inner js-file-line">add_filter( &#8216;wc_usps_flat_rate_boxes&#8217;, &#8216;custom_usps_flat_rate_boxes&#8217; );</td>
</tr>
<tr>
<td id="file-usps-fixed-package-dimensions-php-L7" class="blob-num js-line-number" data-line-number="7"> </td>
<td id="file-usps-fixed-package-dimensions-php-LC7" class="blob-code blob-code-inner js-file-line">function custom_usps_flat_rate_boxes( $flat_rate_boxes ) {</td>
</tr>
<tr>
<td id="file-usps-fixed-package-dimensions-php-L8" class="blob-num js-line-number" data-line-number="8"> </td>
<td id="file-usps-fixed-package-dimensions-php-LC8" class="blob-code blob-code-inner js-file-line"> </td>
</tr>
<tr>
<td id="file-usps-fixed-package-dimensions-php-L9" class="blob-num js-line-number" data-line-number="9"> </td>
<td id="file-usps-fixed-package-dimensions-php-LC9" class="blob-code blob-code-inner js-file-line">// Priority Mail Express Envelopes</td>
</tr>
<tr>
<td id="file-usps-fixed-package-dimensions-php-L10" class="blob-num js-line-number" data-line-number="10"> </td>
<td id="file-usps-fixed-package-dimensions-php-LC10" class="blob-code blob-code-inner js-file-line">$flat_rate_boxes[&#8220;d13&#8221;][&#8220;type&#8221;] = &#8216;envelope&#8217;;</td>
</tr>
<tr>
<td id="file-usps-fixed-package-dimensions-php-L11" class="blob-num js-line-number" data-line-number="11"> </td>
<td id="file-usps-fixed-package-dimensions-php-LC11" class="blob-code blob-code-inner js-file-line">$flat_rate_boxes[&#8220;d30&#8221;][&#8220;type&#8221;] = &#8216;envelope&#8217;;</td>
</tr>
<tr>
<td id="file-usps-fixed-package-dimensions-php-L12" class="blob-num js-line-number" data-line-number="12"> </td>
<td id="file-usps-fixed-package-dimensions-php-LC12" class="blob-code blob-code-inner js-file-line">$flat_rate_boxes[&#8220;d55&#8221;][&#8220;type&#8221;] = &#8216;envelope&#8217;;</td>
</tr>
<tr>
<td id="file-usps-fixed-package-dimensions-php-L13" class="blob-num js-line-number" data-line-number="13"> </td>
<td id="file-usps-fixed-package-dimensions-php-LC13" class="blob-code blob-code-inner js-file-line">$flat_rate_boxes[&#8220;d63&#8221;][&#8220;type&#8221;] = &#8216;envelope&#8217;;</td>
</tr>
<tr>
<td id="file-usps-fixed-package-dimensions-php-L14" class="blob-num js-line-number" data-line-number="14"> </td>
<td id="file-usps-fixed-package-dimensions-php-LC14" class="blob-code blob-code-inner js-file-line">$flat_rate_boxes[&#8220;d98&#8221;][&#8220;type&#8221;] = &#8216;envelope&#8217;;</td>
</tr>
<tr>
<td id="file-usps-fixed-package-dimensions-php-L15" class="blob-num js-line-number" data-line-number="15"> </td>
<td id="file-usps-fixed-package-dimensions-php-LC15" class="blob-code blob-code-inner js-file-line"> </td>
</tr>
<tr>
<td id="file-usps-fixed-package-dimensions-php-L16" class="blob-num js-line-number" data-line-number="16"> </td>
<td id="file-usps-fixed-package-dimensions-php-LC16" class="blob-code blob-code-inner js-file-line">// Priority Mail Envelopes</td>
</tr>
<tr>
<td id="file-usps-fixed-package-dimensions-php-L17" class="blob-num js-line-number" data-line-number="17"> </td>
<td id="file-usps-fixed-package-dimensions-php-LC17" class="blob-code blob-code-inner js-file-line">$flat_rate_boxes[&#8220;d16&#8221;][&#8220;type&#8221;] = &#8216;envelope&#8217;;</td>
</tr>
<tr>
<td id="file-usps-fixed-package-dimensions-php-L18" class="blob-num js-line-number" data-line-number="18"> </td>
<td id="file-usps-fixed-package-dimensions-php-LC18" class="blob-code blob-code-inner js-file-line">$flat_rate_boxes[&#8220;d29&#8221;][&#8220;type&#8221;] = &#8216;envelope&#8217;;</td>
</tr>
<tr>
<td id="file-usps-fixed-package-dimensions-php-L19" class="blob-num js-line-number" data-line-number="19"> </td>
<td id="file-usps-fixed-package-dimensions-php-LC19" class="blob-code blob-code-inner js-file-line">$flat_rate_boxes[&#8220;d38&#8221;][&#8220;type&#8221;] = &#8216;envelope&#8217;;</td>
</tr>
<tr>
<td id="file-usps-fixed-package-dimensions-php-L20" class="blob-num js-line-number" data-line-number="20"> </td>
<td id="file-usps-fixed-package-dimensions-php-LC20" class="blob-code blob-code-inner js-file-line">$flat_rate_boxes[&#8220;d40&#8221;][&#8220;type&#8221;] = &#8216;envelope&#8217;;</td>
</tr>
<tr>
<td id="file-usps-fixed-package-dimensions-php-L21" class="blob-num js-line-number" data-line-number="21"> </td>
<td id="file-usps-fixed-package-dimensions-php-LC21" class="blob-code blob-code-inner js-file-line">$flat_rate_boxes[&#8220;d42&#8221;][&#8220;type&#8221;] = &#8216;envelope&#8217;;</td>
</tr>
<tr>
<td id="file-usps-fixed-package-dimensions-php-L22" class="blob-num js-line-number" data-line-number="22"> </td>
<td id="file-usps-fixed-package-dimensions-php-LC22" class="blob-code blob-code-inner js-file-line">$flat_rate_boxes[&#8220;d44&#8221;][&#8220;type&#8221;] = &#8216;envelope&#8217;;</td>
</tr>
<tr>
<td id="file-usps-fixed-package-dimensions-php-L23" class="blob-num js-line-number" data-line-number="23"> </td>
<td id="file-usps-fixed-package-dimensions-php-LC23" class="blob-code blob-code-inner js-file-line"> </td>
</tr>
<tr>
<td id="file-usps-fixed-package-dimensions-php-L24" class="blob-num js-line-number" data-line-number="24"> </td>
<td id="file-usps-fixed-package-dimensions-php-LC24" class="blob-code blob-code-inner js-file-line">// International Priority Mail Express</td>
</tr>
<tr>
<td id="file-usps-fixed-package-dimensions-php-L25" class="blob-num js-line-number" data-line-number="25"> </td>
<td id="file-usps-fixed-package-dimensions-php-LC25" class="blob-code blob-code-inner js-file-line">$flat_rate_boxes[&#8220;i13&#8221;][&#8220;type&#8221;] = &#8216;envelope&#8217;;</td>
</tr>
<tr>
<td id="file-usps-fixed-package-dimensions-php-L26" class="blob-num js-line-number" data-line-number="26"> </td>
<td id="file-usps-fixed-package-dimensions-php-LC26" class="blob-code blob-code-inner js-file-line">$flat_rate_boxes[&#8220;130&#8221;][&#8220;type&#8221;] = &#8216;envelope&#8217;;</td>
</tr>
<tr>
<td id="file-usps-fixed-package-dimensions-php-L27" class="blob-num js-line-number" data-line-number="27"> </td>
<td id="file-usps-fixed-package-dimensions-php-LC27" class="blob-code blob-code-inner js-file-line"> </td>
</tr>
<tr>
<td id="file-usps-fixed-package-dimensions-php-L28" class="blob-num js-line-number" data-line-number="28"> </td>
<td id="file-usps-fixed-package-dimensions-php-LC28" class="blob-code blob-code-inner js-file-line">// International Priority Mail</td>
</tr>
<tr>
<td id="file-usps-fixed-package-dimensions-php-L29" class="blob-num js-line-number" data-line-number="29"> </td>
<td id="file-usps-fixed-package-dimensions-php-LC29" class="blob-code blob-code-inner js-file-line">$flat_rate_boxes[&#8220;i8&#8221;][&#8220;type&#8221;] = &#8216;envelope&#8217;;</td>
</tr>
<tr>
<td id="file-usps-fixed-package-dimensions-php-L30" class="blob-num js-line-number" data-line-number="30"> </td>
<td id="file-usps-fixed-package-dimensions-php-LC30" class="blob-code blob-code-inner js-file-line">$flat_rate_boxes[&#8220;i29&#8221;][&#8220;type&#8221;] = &#8216;envelope&#8217;;</td>
</tr>
<tr>
<td id="file-usps-fixed-package-dimensions-php-L31" class="blob-num js-line-number" data-line-number="31"> </td>
<td id="file-usps-fixed-package-dimensions-php-LC31" class="blob-code blob-code-inner js-file-line"> </td>
</tr>
<tr>
<td id="file-usps-fixed-package-dimensions-php-L32" class="blob-num js-line-number" data-line-number="32"> </td>
<td id="file-usps-fixed-package-dimensions-php-LC32" class="blob-code blob-code-inner js-file-line">return $flat_rate_boxes;</td>
</tr>
<tr>
<td id="file-usps-fixed-package-dimensions-php-L33" class="blob-num js-line-number" data-line-number="33"> </td>
<td id="file-usps-fixed-package-dimensions-php-LC33" class="blob-code blob-code-inner js-file-line"> </td>
</tr>
<tr>
<td id="file-usps-fixed-package-dimensions-php-L34" class="blob-num js-line-number" data-line-number="34"> </td>
<td id="file-usps-fixed-package-dimensions-php-LC34" class="blob-code blob-code-inner js-file-line">}</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
<p>&nbsp;</p>
</div>
</div>
<p>To remove all the USPS Priority Flat Rate envelopes, leaving only the Small, Medium, and Large Flat Rate boxes, add this to your theme’s functions.php file:</p>
<div id="gist87968192" class="gist">
<div class="gist-file">
<div class="gist-data">
<div class="js-gist-file-update-container js-task-list-container file-box">
<div id="file-usps-remove-priority-flat-rate-envelopes-php" class="file my-2">
<div class="Box-body p-0 blob-wrapper data type-php  ">
<table class="highlight tab-size js-file-line-container" data-tab-size="8" data-paste-markdown-skip="">
<tbody>
<tr>
<td id="file-usps-remove-priority-flat-rate-envelopes-php-L1" class="blob-num js-line-number" data-line-number="1"> </td>
<td id="file-usps-remove-priority-flat-rate-envelopes-php-LC1" class="blob-code blob-code-inner js-file-line">/**</td>
</tr>
<tr>
<td id="file-usps-remove-priority-flat-rate-envelopes-php-L2" class="blob-num js-line-number" data-line-number="2"> </td>
<td id="file-usps-remove-priority-flat-rate-envelopes-php-LC2" class="blob-code blob-code-inner js-file-line">* Remove USPS Flat rate envelopes from the available options</td>
</tr>
<tr>
<td id="file-usps-remove-priority-flat-rate-envelopes-php-L3" class="blob-num js-line-number" data-line-number="3"> </td>
<td id="file-usps-remove-priority-flat-rate-envelopes-php-LC3" class="blob-code blob-code-inner js-file-line">* Once added the customer will not see any rates for envelopes</td>
</tr>
<tr>
<td id="file-usps-remove-priority-flat-rate-envelopes-php-L4" class="blob-num js-line-number" data-line-number="4"> </td>
<td id="file-usps-remove-priority-flat-rate-envelopes-php-LC4" class="blob-code blob-code-inner js-file-line">* Only Small, Medium, and Large Flat Rate boxes will be used</td>
</tr>
<tr>
<td id="file-usps-remove-priority-flat-rate-envelopes-php-L5" class="blob-num js-line-number" data-line-number="5"> </td>
<td id="file-usps-remove-priority-flat-rate-envelopes-php-LC5" class="blob-code blob-code-inner js-file-line">*/</td>
</tr>
<tr>
<td id="file-usps-remove-priority-flat-rate-envelopes-php-L6" class="blob-num js-line-number" data-line-number="6"> </td>
<td id="file-usps-remove-priority-flat-rate-envelopes-php-LC6" class="blob-code blob-code-inner js-file-line">add_filter( &#8216;wc_usps_flat_rate_boxes&#8217;, &#8216;custom_usps_flat_rate_boxes&#8217; );</td>
</tr>
<tr>
<td id="file-usps-remove-priority-flat-rate-envelopes-php-L7" class="blob-num js-line-number" data-line-number="7"> </td>
<td id="file-usps-remove-priority-flat-rate-envelopes-php-LC7" class="blob-code blob-code-inner js-file-line">function custom_usps_flat_rate_boxes( $flat_rate_boxes ) {</td>
</tr>
<tr>
<td id="file-usps-remove-priority-flat-rate-envelopes-php-L8" class="blob-num js-line-number" data-line-number="8"> </td>
<td id="file-usps-remove-priority-flat-rate-envelopes-php-LC8" class="blob-code blob-code-inner js-file-line"> </td>
</tr>
<tr>
<td id="file-usps-remove-priority-flat-rate-envelopes-php-L9" class="blob-num js-line-number" data-line-number="9"> </td>
<td id="file-usps-remove-priority-flat-rate-envelopes-php-LC9" class="blob-code blob-code-inner js-file-line">unset($flat_rate_boxes[&#8220;d29&#8221;]);</td>
</tr>
<tr>
<td id="file-usps-remove-priority-flat-rate-envelopes-php-L10" class="blob-num js-line-number" data-line-number="10"> </td>
<td id="file-usps-remove-priority-flat-rate-envelopes-php-LC10" class="blob-code blob-code-inner js-file-line">unset($flat_rate_boxes[&#8220;d30&#8221;]);</td>
</tr>
<tr>
<td id="file-usps-remove-priority-flat-rate-envelopes-php-L11" class="blob-num js-line-number" data-line-number="11"> </td>
<td id="file-usps-remove-priority-flat-rate-envelopes-php-LC11" class="blob-code blob-code-inner js-file-line">unset($flat_rate_boxes[&#8220;d63&#8221;]);</td>
</tr>
<tr>
<td id="file-usps-remove-priority-flat-rate-envelopes-php-L12" class="blob-num js-line-number" data-line-number="12"> </td>
<td id="file-usps-remove-priority-flat-rate-envelopes-php-LC12" class="blob-code blob-code-inner js-file-line">unset($flat_rate_boxes[&#8220;d16&#8221;]);</td>
</tr>
<tr>
<td id="file-usps-remove-priority-flat-rate-envelopes-php-L13" class="blob-num js-line-number" data-line-number="13"> </td>
<td id="file-usps-remove-priority-flat-rate-envelopes-php-LC13" class="blob-code blob-code-inner js-file-line">unset($flat_rate_boxes[&#8220;d38&#8221;]);</td>
</tr>
<tr>
<td id="file-usps-remove-priority-flat-rate-envelopes-php-L14" class="blob-num js-line-number" data-line-number="14"> </td>
<td id="file-usps-remove-priority-flat-rate-envelopes-php-LC14" class="blob-code blob-code-inner js-file-line">unset($flat_rate_boxes[&#8220;d40&#8221;]);</td>
</tr>
<tr>
<td id="file-usps-remove-priority-flat-rate-envelopes-php-L15" class="blob-num js-line-number" data-line-number="15"> </td>
<td id="file-usps-remove-priority-flat-rate-envelopes-php-LC15" class="blob-code blob-code-inner js-file-line">unset($flat_rate_boxes[&#8220;d42&#8221;]);</td>
</tr>
<tr>
<td id="file-usps-remove-priority-flat-rate-envelopes-php-L16" class="blob-num js-line-number" data-line-number="16"> </td>
<td id="file-usps-remove-priority-flat-rate-envelopes-php-LC16" class="blob-code blob-code-inner js-file-line">unset($flat_rate_boxes[&#8220;d44&#8221;]);</td>
</tr>
<tr>
<td id="file-usps-remove-priority-flat-rate-envelopes-php-L17" class="blob-num js-line-number" data-line-number="17"> </td>
<td id="file-usps-remove-priority-flat-rate-envelopes-php-LC17" class="blob-code blob-code-inner js-file-line">unset($flat_rate_boxes[&#8220;d13&#8221;]);</td>
</tr>
<tr>
<td id="file-usps-remove-priority-flat-rate-envelopes-php-L18" class="blob-num js-line-number" data-line-number="18"> </td>
<td id="file-usps-remove-priority-flat-rate-envelopes-php-LC18" class="blob-code blob-code-inner js-file-line"> </td>
</tr>
<tr>
<td id="file-usps-remove-priority-flat-rate-envelopes-php-L19" class="blob-num js-line-number" data-line-number="19"> </td>
<td id="file-usps-remove-priority-flat-rate-envelopes-php-LC19" class="blob-code blob-code-inner js-file-line">unset($flat_rate_boxes[&#8220;i33&#8221;]);</td>
</tr>
<tr>
<td id="file-usps-remove-priority-flat-rate-envelopes-php-L20" class="blob-num js-line-number" data-line-number="20"> </td>
<td id="file-usps-remove-priority-flat-rate-envelopes-php-LC20" class="blob-code blob-code-inner js-file-line">unset($flat_rate_boxes[&#8220;i30&#8221;]);</td>
</tr>
<tr>
<td id="file-usps-remove-priority-flat-rate-envelopes-php-L21" class="blob-num js-line-number" data-line-number="21"> </td>
<td id="file-usps-remove-priority-flat-rate-envelopes-php-LC21" class="blob-code blob-code-inner js-file-line">unset($flat_rate_boxes[&#8220;i63&#8221;]);</td>
</tr>
<tr>
<td id="file-usps-remove-priority-flat-rate-envelopes-php-L22" class="blob-num js-line-number" data-line-number="22"> </td>
<td id="file-usps-remove-priority-flat-rate-envelopes-php-LC22" class="blob-code blob-code-inner js-file-line">unset($flat_rate_boxes[&#8220;i8&#8221;]);</td>
</tr>
<tr>
<td id="file-usps-remove-priority-flat-rate-envelopes-php-L23" class="blob-num js-line-number" data-line-number="23"> </td>
<td id="file-usps-remove-priority-flat-rate-envelopes-php-LC23" class="blob-code blob-code-inner js-file-line">unset($flat_rate_boxes[&#8220;i29&#8221;]);</td>
</tr>
<tr>
<td id="file-usps-remove-priority-flat-rate-envelopes-php-L24" class="blob-num js-line-number" data-line-number="24"> </td>
<td id="file-usps-remove-priority-flat-rate-envelopes-php-LC24" class="blob-code blob-code-inner js-file-line">unset($flat_rate_boxes[&#8220;i13&#8221;]);</td>
</tr>
<tr>
<td id="file-usps-remove-priority-flat-rate-envelopes-php-L25" class="blob-num js-line-number" data-line-number="25"> </td>
<td id="file-usps-remove-priority-flat-rate-envelopes-php-LC25" class="blob-code blob-code-inner js-file-line"> </td>
</tr>
<tr>
<td id="file-usps-remove-priority-flat-rate-envelopes-php-L26" class="blob-num js-line-number" data-line-number="26"> </td>
<td id="file-usps-remove-priority-flat-rate-envelopes-php-LC26" class="blob-code blob-code-inner js-file-line">return $flat_rate_boxes;</td>
</tr>
<tr>
<td id="file-usps-remove-priority-flat-rate-envelopes-php-L27" class="blob-num js-line-number" data-line-number="27"> </td>
<td id="file-usps-remove-priority-flat-rate-envelopes-php-LC27" class="blob-code blob-code-inner js-file-line"> </td>
</tr>
<tr>
<td id="file-usps-remove-priority-flat-rate-envelopes-php-L28" class="blob-num js-line-number" data-line-number="28"> </td>
<td id="file-usps-remove-priority-flat-rate-envelopes-php-LC28" class="blob-code blob-code-inner js-file-line">}</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
<p>&nbsp;</p>
</div>
</div>
<p>The codes for each flat rate box can be found below:</p>
<p><strong>Priority Mail Express</strong><br />
Priority Mail Express Flat Rate Envelope: d13<br />
Priority Mail Express Legal Flat Rate Envelope: d30<br />
Priority Mail Express Padded Flat Rate Envelope: d63</p>
<p><strong>Priority Mail</strong><br />
Priority Mail Flat Rate Envelope: d16<br />
Priority Mail Flat Rate Medium Box (Side Loading): d17<br />
Priority Mail Flat Rate Medium Box (Top Loading): d17b<br />
Priority Mail Flat Rate Large Box: d22<br />
Priority Mail Flat Rate Large Box (Board Game): d22a<br />
Priority Mail Flat Rate Small Box: d28<br />
Priority Mail Padded Flat Rate Envelope: d29<br />
Priority Mail Gift Card Flat Rate Envelope: d38<br />
Priority Mail Window Flat Rate Envelope: d40<br />
Priority Mail Small Flat Rate Envelope: d42<br />
Priority Mail Legal Flat Rate Envelope: d44</p>
<p><strong>International Priority Mail Express</strong><br />
Priority Mail Express Flat Rate Envelope: i13<br />
Priority Mail Express Legal Flat Rate Envelope: i30<br />
Priority Mail Express Padded Flat Rate Envelope: i63</p>
<p><strong>International Priority Mail</strong><br />
Priority Mail Flat Rate Envelope: i8<br />
Priority Mail Padded Flat Rate Envelope: i29<br />
Priority Mail Flat Rate Small Box: i16<br />
Priority Mail Flat Rate Medium Box (Side Loading): i9<br />
Priority Mail Flat Rate Medium Box (Top Loading): i9b<br />
Priority Mail Flat Rate Large Box (Top Loading): i11</p>
<h3 id="section-23">Exclude a country from USPS rates</h3>
<p>If you wish to exclude a country from receiving USPS rates, the easiest way is to use <a href="https://help.codibu.com/blog/kb/setting-up-shipping-zones/">Shipping Zones</a> (WooCommerce 2.6+). However if you wish, you can use the snippet below. Change <strong>US</strong> to the country code you’d like to exclude:</p>
<div id="gist87968259" class="gist">
<div class="gist-file">
<div class="gist-data">
<div class="js-gist-file-update-container js-task-list-container file-box">
<div id="file-usps-exclude-country-from-receiving-rates-php" class="file my-2">
<div class="Box-body p-0 blob-wrapper data type-php  ">
<table class="highlight tab-size js-file-line-container" data-tab-size="8" data-paste-markdown-skip="">
<tbody>
<tr>
<td id="file-usps-exclude-country-from-receiving-rates-php-L1" class="blob-num js-line-number" data-line-number="1"> </td>
<td id="file-usps-exclude-country-from-receiving-rates-php-LC1" class="blob-code blob-code-inner js-file-line">add_filter( &#8216;woocommerce_package_rates&#8217;, &#8216;wcsupport_no_usps_us&#8217;, 10, 2 );</td>
</tr>
<tr>
<td id="file-usps-exclude-country-from-receiving-rates-php-L2" class="blob-num js-line-number" data-line-number="2"> </td>
<td id="file-usps-exclude-country-from-receiving-rates-php-LC2" class="blob-code blob-code-inner js-file-line">function wcsupport_no_usps_us( $rates, $package ) {</td>
</tr>
<tr>
<td id="file-usps-exclude-country-from-receiving-rates-php-L3" class="blob-num js-line-number" data-line-number="3"> </td>
<td id="file-usps-exclude-country-from-receiving-rates-php-LC3" class="blob-code blob-code-inner js-file-line"> </td>
</tr>
<tr>
<td id="file-usps-exclude-country-from-receiving-rates-php-L4" class="blob-num js-line-number" data-line-number="4"> </td>
<td id="file-usps-exclude-country-from-receiving-rates-php-LC4" class="blob-code blob-code-inner js-file-line">if ( WC()-<span class="pl-kos">&gt;</span>customer-<span class="pl-kos">&gt;</span>shipping_country == &#8216;US&#8217; ) {</td>
</tr>
<tr>
<td id="file-usps-exclude-country-from-receiving-rates-php-L5" class="blob-num js-line-number" data-line-number="5"> </td>
<td id="file-usps-exclude-country-from-receiving-rates-php-LC5" class="blob-code blob-code-inner js-file-line">foreach( $rates as $key =<span class="pl-kos">&gt;</span> $rate ) {</td>
</tr>
<tr>
<td id="file-usps-exclude-country-from-receiving-rates-php-L6" class="blob-num js-line-number" data-line-number="6"> </td>
<td id="file-usps-exclude-country-from-receiving-rates-php-LC6" class="blob-code blob-code-inner js-file-line">if (strpos($key,&#8217;usps&#8217;) !== false) {</td>
</tr>
<tr>
<td id="file-usps-exclude-country-from-receiving-rates-php-L7" class="blob-num js-line-number" data-line-number="7"> </td>
<td id="file-usps-exclude-country-from-receiving-rates-php-LC7" class="blob-code blob-code-inner js-file-line">unset( $rates[$key] );</td>
</tr>
<tr>
<td id="file-usps-exclude-country-from-receiving-rates-php-L8" class="blob-num js-line-number" data-line-number="8"> </td>
<td id="file-usps-exclude-country-from-receiving-rates-php-LC8" class="blob-code blob-code-inner js-file-line">}</td>
</tr>
<tr>
<td id="file-usps-exclude-country-from-receiving-rates-php-L9" class="blob-num js-line-number" data-line-number="9"> </td>
<td id="file-usps-exclude-country-from-receiving-rates-php-LC9" class="blob-code blob-code-inner js-file-line">}</td>
</tr>
<tr>
<td id="file-usps-exclude-country-from-receiving-rates-php-L10" class="blob-num js-line-number" data-line-number="10"> </td>
<td id="file-usps-exclude-country-from-receiving-rates-php-LC10" class="blob-code blob-code-inner js-file-line">}</td>
</tr>
<tr>
<td id="file-usps-exclude-country-from-receiving-rates-php-L11" class="blob-num js-line-number" data-line-number="11"> </td>
<td id="file-usps-exclude-country-from-receiving-rates-php-LC11" class="blob-code blob-code-inner js-file-line"> </td>
</tr>
<tr>
<td id="file-usps-exclude-country-from-receiving-rates-php-L12" class="blob-num js-line-number" data-line-number="12"> </td>
<td id="file-usps-exclude-country-from-receiving-rates-php-LC12" class="blob-code blob-code-inner js-file-line">return $rates;</td>
</tr>
<tr>
<td id="file-usps-exclude-country-from-receiving-rates-php-L13" class="blob-num js-line-number" data-line-number="13"> </td>
<td id="file-usps-exclude-country-from-receiving-rates-php-LC13" class="blob-code blob-code-inner js-file-line"> </td>
</tr>
<tr>
<td id="file-usps-exclude-country-from-receiving-rates-php-L14" class="blob-num js-line-number" data-line-number="14"> </td>
<td id="file-usps-exclude-country-from-receiving-rates-php-LC14" class="blob-code blob-code-inner js-file-line">}</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
<p>&nbsp;</p>
</div>
</div>
<h2 id="section-24">FAQ</h2>
<h3 id="section-25">Do Shipping Zones work with USPS Shipping?</h3>
<p>Yes!</p>
<h3 id="section-26"><strong>How can I get First Class Mail® International Large Envelope rates to display?</strong></h3>
<p>You need to use the <strong>Recommended</strong> parcel packing method and ensure that the <strong>Letter</strong> checkbox is ticked:</p>
<p><a href="https://help.codibu.com/wp-content/uploads/2020/11/usps-international-first-class-env.png"><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-10773" src="https://help.codibu.com/wp-content/uploads/2020/11/usps-international-first-class-env.png" alt="" width="1159" height="265" /></a></p>
<p>Additionally, per USPS, these services are not offered because they can’t be used for shipping merchandise. However, there is a way to override this setting in the extension with the following snippet:</p>
<div id="gist100501100" class="gist">
<div class="gist-file">
<div class="gist-data">
<div class="js-gist-file-update-container js-task-list-container file-box">
<div id="file-woocommerce-usps-letters-and-envelopes-php" class="file my-2">
<div class="Box-body p-0 blob-wrapper data type-php  ">
<table class="highlight tab-size js-file-line-container" data-tab-size="8" data-paste-markdown-skip="">
<tbody>
<tr>
<td id="file-woocommerce-usps-letters-and-envelopes-php-L1" class="blob-num js-line-number" data-line-number="1"> </td>
<td id="file-woocommerce-usps-letters-and-envelopes-php-LC1" class="blob-code blob-code-inner js-file-line">/**</td>
</tr>
<tr>
<td id="file-woocommerce-usps-letters-and-envelopes-php-L2" class="blob-num js-line-number" data-line-number="2"> </td>
<td id="file-woocommerce-usps-letters-and-envelopes-php-LC2" class="blob-code blob-code-inner js-file-line">* Add letters and envelopes to international services.</td>
</tr>
<tr>
<td id="file-woocommerce-usps-letters-and-envelopes-php-L3" class="blob-num js-line-number" data-line-number="3"> </td>
<td id="file-woocommerce-usps-letters-and-envelopes-php-LC3" class="blob-code blob-code-inner js-file-line">*/</td>
</tr>
<tr>
<td id="file-woocommerce-usps-letters-and-envelopes-php-L4" class="blob-num js-line-number" data-line-number="4"> </td>
<td id="file-woocommerce-usps-letters-and-envelopes-php-LC4" class="blob-code blob-code-inner js-file-line">add_filter( &#8216;wc_usps_services&#8217;, function( $services ) {</td>
</tr>
<tr>
<td id="file-woocommerce-usps-letters-and-envelopes-php-L5" class="blob-num js-line-number" data-line-number="5"> </td>
<td id="file-woocommerce-usps-letters-and-envelopes-php-LC5" class="blob-code blob-code-inner js-file-line">$services[&#8216;I_FIRST_CLASS&#8217;][&#8216;services&#8217;][&#8217;13&#8217;] = &#8220;First Class Mail&amp;#0174; International Letters&#8221;;</td>
</tr>
<tr>
<td id="file-woocommerce-usps-letters-and-envelopes-php-L6" class="blob-num js-line-number" data-line-number="6"> </td>
<td id="file-woocommerce-usps-letters-and-envelopes-php-LC6" class="blob-code blob-code-inner js-file-line">$services[&#8216;I_FIRST_CLASS&#8217;][&#8216;services&#8217;][&#8217;14&#8217;] = &#8220;First Class Mail&amp;#0174; International Large Envelope&#8221;;</td>
</tr>
<tr>
<td id="file-woocommerce-usps-letters-and-envelopes-php-L7" class="blob-num js-line-number" data-line-number="7"> </td>
<td id="file-woocommerce-usps-letters-and-envelopes-php-LC7" class="blob-code blob-code-inner js-file-line"> </td>
</tr>
<tr>
<td id="file-woocommerce-usps-letters-and-envelopes-php-L8" class="blob-num js-line-number" data-line-number="8"> </td>
<td id="file-woocommerce-usps-letters-and-envelopes-php-LC8" class="blob-code blob-code-inner js-file-line">return $services;</td>
</tr>
<tr>
<td id="file-woocommerce-usps-letters-and-envelopes-php-L9" class="blob-num js-line-number" data-line-number="9"> </td>
<td id="file-woocommerce-usps-letters-and-envelopes-php-LC9" class="blob-code blob-code-inner js-file-line">} );</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
</div><p>The post <a href="https://help.codibu.com/blog/usps-shipping-method/">USPS Shipping Method</a> first appeared on <a href="https://help.codibu.com">CODIBU</a>.</p>]]></content:encoded>
					
					<wfw:commentRss>https://help.codibu.com/blog/usps-shipping-method/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
