WordPress at a glance
function is not described

Automattic\WooCommerce\Admin\Notes

GoogleAdsAndMarketing::orders_last_month() protected WC 1.0

Determine the number of orders in the last month

{} It's a method of the class: GoogleAdsAndMarketing{}

No Hooks.

Return

Int. Nothing.

Usage

$result = GoogleAdsAndMarketing::orders_last_month();

Code of GoogleAdsAndMarketing::orders_last_month() WC 5.3.0

<?php
protected static function orders_last_month() {

	$date = new \DateTime();

	$args = array(
		'date_created' => '>' . $date->modify( '-1 month' )->format( 'Y-m-d' ),
		'return'       => 'ids',
	);

	return count( wc_get_orders( $args ) );
}