Automattic\WooCommerce\Admin\Notes
GoogleAdsAndMarketing::possibly_add_note() public WC 1.0
Possibly add note.
{} Это метод класса: GoogleAdsAndMarketing{}
Хуков нет.
Возвращает
Null. Ничего.
Использование
$result = GoogleAdsAndMarketing::possibly_add_note();
Код GoogleAdsAndMarketing::possibly_add_note() GoogleAdsAndMarketing::possibly add note WC 5.0.0
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();
}