WooCommerce Code Reference

CatalogSortOrder
in package

Enum class for the possible values of the 'woocommerce_default_catalog_orderby' option.

Tags
since
11.1.0

Table of Contents

DATE  = 'date'
Sort by most recent.
MENU_ORDER  = 'menu_order'
Default sorting (custom ordering + name).
POPULARITY  = 'popularity'
Sort by popularity (number of sales).
PRICE  = 'price'
Sort by price ascending.
PRICE_DESC  = 'price-desc'
Sort by price descending.
RATING  = 'rating'
Sort by average rating.

Constants