{"id":17771964,"date":"2024-05-22T03:37:10","date_gmt":"2024-05-22T03:37:10","guid":{"rendered":"https:\/\/wordpress.org\/support\/topic\/girth\/"},"modified":"2024-05-22T03:37:10","modified_gmt":"2024-05-22T03:37:10","slug":"girth","status":"publish","type":"topic","link":"https:\/\/wordpress.org\/support\/topic\/girth\/","title":{"rendered":"Girth"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">Hi Team, <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Slight bug in the plugin. Girth is being the limiting factor for a domestic shipment, 140cm Girth is only a requirement for International shipment. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The restriction for domestic shipping is 0.25 cubic metres. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">https:\/\/auspost.com.au\/business\/shipping\/guidelines\/size-weight-guidelines<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Workaround to get me by is below, however it would be nice to have this handled in the official code base. <\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>            \/\/ Min sizes - girth minimum is 16cm\n            $girth = ( round(wc_get_dimension($dimensions&#091;0], 'cm', $from_dimension_unit)) + round(wc_get_dimension($dimensions&#091;1], 'cm', $from_dimension_unit)) ) * 2;\n\n\n            $cubic_meters = (round(wc_get_dimension($dimensions&#091;0], 'cm', $from_dimension_unit)) * round(wc_get_dimension($dimensions&#091;1], 'cm', $from_dimension_unit)) * round(wc_get_dimension($dimensions&#091;2], 'cm', $from_dimension_unit))) \/ 1000000;\n\n            if ($package&#091;'destination']&#091;'country'] == 'AU') {\n                if ($parcel&#091;'weight'] &gt; 22 || $dimensions&#091;2] &gt; 105 || $cubic_meters &gt; 0.25) {\n                    $this-&gt;debug( wp_kses_post('Product ' . $item_id . ' has invalid weight\/dimensions. Aborting. See &lt;a href=\"http:\/\/auspost.com.au\/personal\/parcel-dimensions.html\"&gt;http:\/\/auspost.com.au\/personal\/parcel-dimensions.html&lt;\/a&gt;', 'wf_australia_post' ), 'error');\n                    return;\n                }\n            }elseif ($girth &lt; 16 || $girth &gt; 140) {\n                $this-&gt;debug(sprintf(__('Girth of the product should lie in between 16cm and 140cm. See &lt;a href=\"http:\/\/ausporthst.com.au\/personal\/parcel-dimensions.html\"&gt;http:\/\/auspost.com.au\/personal\/parcel-dimensions.html&lt;\/a&gt;', 'wf_australia_post'), $item_id), 'error');\n                return;\n            }<\/code><\/pre>\n","protected":false},"template":"","class_list":["post-17771964","topic","type-topic","status-publish","hentry"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/17771964","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic"}],"about":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/types\/topic"}],"version-history":[{"count":0,"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/17771964\/revisions"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/media?parent=17771964"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}