Search results for ""

Sorry, no results found. Perhaps you would like to search the documentation?
All Topics

WooCommerce Variation Prices are sorted as text value

I was trying to sort my WooCommerce variation by price as well as cost, and noticed that these numeric fields are being treated as text values even when they have a currency prefix. I wasn’t sure if this was coming from ACP or not, but some numeric fields look alright so it might be. Any feedback would be appreciated.

5 months ago
Stefan van den Dungen Gronovius

Thanks for your feedback.
The sorting logic is indeed implemented incorrectly.
It will be patched in the next version of Admin Columns,

If you want to quickly patch it yourself, you can change the following file:

/admin-columns-pro/addons/woocommerce/classes/Column/ProductVariation/Price.php#68 (in the sorting method)

It should now look like this:

    public function sorting()
        return new ACP\Sorting\Model\Post\Meta(
            new ACP\Sorting\Type\DataType(ACP\Sorting\Type\DataType::DECIMAL)
5 months ago

You must be logged in to reply to this topic.