WordPress at a glance
function is not described

Automattic\WooCommerce\Admin\Notes

GoogleAdsAndMarketing::possibly_add_note() public WC 1.0

Possibly add note.

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

No Hooks.

Return

null. Nothing.

Usage

$result = GoogleAdsAndMarketing::possibly_add_note();

Code of GoogleAdsAndMarketing::possibly_add_note() WC 5.3.0

<?php
public static function possibly_add_note() {

	// Check if the note can and should be added.
	if ( ! self::can_be_added() ) {
		return;
	}

	// Only add the note to stores with Google Ads and Marketing installed.
	if ( ! self::is_google_ads_and_marketing_installed() ) {
		return;
	}

	// Only add the note to stores with at least 20 orders in the last month.
	if ( self::orders_last_month() < 20 ) {
		return;
	}

	$note = self::get_note();
	$note->save();
}