Automattic\WooCommerce\StoreApi\Utilities
ProductQuery::get_last_modified()
Get last modified date for all products.
Метод класса: ProductQuery{}
Хуков нет.
Возвращает
int
. timestamp.
Использование
$ProductQuery = new ProductQuery(); $ProductQuery->get_last_modified();
Код ProductQuery::get_last_modified() ProductQuery::get last modified WC 9.5.1
public function get_last_modified() { global $wpdb; return strtotime( $wpdb->get_var( "SELECT MAX( post_modified_gmt ) FROM {$wpdb->posts} WHERE post_type IN ( 'product', 'product_variation' );" ) ); }