Girth
-
Hi Team,
Slight bug in the plugin. Girth is being the limiting factor for a domestic shipment, 140cm Girth is only a requirement for International shipment.
The restriction for domestic shipping is 0.25 cubic metres.
https://auspost.com.au/business/shipping/guidelines/size-weight-guidelines
Workaround to get me by is below, however it would be nice to have this handled in the official code base.
// Min sizes - girth minimum is 16cm $girth = ( round(wc_get_dimension($dimensions[0], 'cm', $from_dimension_unit)) + round(wc_get_dimension($dimensions[1], 'cm', $from_dimension_unit)) ) * 2; $cubic_meters = (round(wc_get_dimension($dimensions[0], 'cm', $from_dimension_unit)) * round(wc_get_dimension($dimensions[1], 'cm', $from_dimension_unit)) * round(wc_get_dimension($dimensions[2], 'cm', $from_dimension_unit))) / 1000000; if ($package['destination']['country'] == 'AU') { if ($parcel['weight'] > 22 || $dimensions[2] > 105 || $cubic_meters > 0.25) { $this->debug( wp_kses_post('Product ' . $item_id . ' has invalid weight/dimensions. Aborting. See <a wf_australia_post' ), 'error'); return; } }elseif ($girth < 16 || $girth > 140) { $this->debug(sprintf(__('Girth of the product should lie in between 16cm and 140cm. See <a wf_australia_post'), $item_id), 'error'); return; }
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Girth’ is closed to new replies.