wc_products_array_orderby_modified( WC_Product $a, WC_Product $b )
Sort by modified.
Description Description
Parameters Parameters
- $a
-
(Required) First WC_Product object.
- $b
-
(Required) Second WC_Product object.
Return Return
(int)
Source Source
File: includes/wc-product-functions.php
function wc_products_array_orderby_modified( $a, $b ) { if ( $a->get_date_modified() === $b->get_date_modified() ) { return 0; } return ( $a->get_date_modified() < $b->get_date_modified() ) ? -1 : 1; }
Changelog Changelog
Version | Description |
---|---|
3.0.0 | Introduced. |