Automattic\WooCommerce\Internal\OrderWithdrawal
OrderWithdrawalFeatureHighlightNotification::maybe_add_note_when_store_goes_live
Add the note when the store is changed from coming soon to live.
This is called when the woocommerce_coming_soon option is updated. It checks if the store has gone live and if so, it calls the possibly_add_note method to add the note.
Метод класса: OrderWithdrawalFeatureHighlightNotification{}
Хуков нет.
Возвращает
null. Ничего (null).
Использование
$OrderWithdrawalFeatureHighlightNotification = new OrderWithdrawalFeatureHighlightNotification(); $OrderWithdrawalFeatureHighlightNotification->maybe_add_note_when_store_goes_live( $old_value, $value ): void;
- $old_value(разное) (обязательный)
- Previous option value.
- $value(разное) (обязательный)
- New option value.
Список изменений
| С версии 11.1.0 | Введена. |
Код OrderWithdrawalFeatureHighlightNotification::maybe_add_note_when_store_goes_live() OrderWithdrawalFeatureHighlightNotification::maybe add note when store goes live WC 11.2.2
public function maybe_add_note_when_store_goes_live( $old_value, $value ): void {
if ( 'yes' !== $old_value || 'no' !== $value ) {
return;
}
$this->possibly_add_note();
}