Download the PHP package ckreidl/woo-dimension-check without Composer
On this page you can find all versions of the php package ckreidl/woo-dimension-check. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download ckreidl/woo-dimension-check
More information about ckreidl/woo-dimension-check
Files in ckreidl/woo-dimension-check
Package woo-dimension-check
Short Description Checks WooCommerce product database via Woo's REST API to identify items that have no weight or dimensions.
License GPL-3.0-or-later
Informations about the package woo-dimension-check
woo-dimension-check
woo-dimension-check is a library that helps to identify WooCommerce products with no weight, length, width, or height.
Installation
composer require ckreidl/woo-dimension-check
Usage
Example
Background
I ran into some issues where the shipping calculators we were using wouldn't play nicely if items didn't have weights and/or measures entered. For example:
- Customer adds widget A to their cart, which doesn't have dimensions or a weight listed
- Customer proceeds to checkout
- Shipping calculator, not knowing the size or weight of widget A, declines to show them shipping options
Meanwhile, another customer adds the same widget A as well as widget B, which does have weight & dimensions
- Customer adds widget A to their cart, with no weight or dims
- Customer adds widget B, with weight & dims
- Shipping calculator defaults to 0 for widget A, solely calculating shipping based off weight and dims of widget B
We can go back and forth all day about what the default behavior should be when an item without this information is encountered. It's my opinion that the database should have that information, so I wrote this little tool to identify items that don't have that data entered.