Automattic\WooCommerce\StoreApi\Utilities
ProductQuery::get_last_modified()
Get last modified date for all products.
Method of the class: ProductQuery{}
No Hooks.
Return
Int
. timestamp.
Usage
$ProductQuery = new ProductQuery(); $ProductQuery->get_last_modified();
ProductQuery::get_last_modified() ProductQuery::get last modified code WC 9.3.3
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' );" ) ); }