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.
Method of the class: OrderWithdrawalFeatureHighlightNotification{}
No Hooks.
Returns
null. Nothing (null).
Usage
$OrderWithdrawalFeatureHighlightNotification = new OrderWithdrawalFeatureHighlightNotification(); $OrderWithdrawalFeatureHighlightNotification->maybe_add_note_when_store_goes_live( $old_value, $value ): void;
- $old_value(mixed) (required)
- Previous option value.
- $value(mixed) (required)
- New option value.
Changelog
| Since 11.1.0 | Introduced. |
OrderWithdrawalFeatureHighlightNotification::maybe_add_note_when_store_goes_live() OrderWithdrawalFeatureHighlightNotification::maybe add note when store goes live code WC 11.1.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();
}