WordPress at a glance
function is not described

wc_products_array_orderby_modified() WC 3.0.0

Sort by modified.

No Hooks.

Return

Int.

Usage

wc_products_array_orderby_modified( $a, $b );
$a(WC_Product) (required)
First WC_Product object.
$b(WC_Product) (required)
Second WC_Product object.

Changelog

Since 3.0.0 Introduced.

Code of wc_products_array_orderby_modified() WC 5.0.0

<?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;
}