Automattic\WooCommerce\Internal\Admin\Notes
WooSubscriptionsNotes::check_connection()
Checks the connection. Adds a note (as necessary) if there is no connection.
Method of the class: WooSubscriptionsNotes{}
No Hooks.
Return
null
. Nothing (null).
Usage
$WooSubscriptionsNotes = new WooSubscriptionsNotes(); $WooSubscriptionsNotes->check_connection();
WooSubscriptionsNotes::check_connection() WooSubscriptionsNotes::check connection code WC 9.8.2
public function check_connection() { if ( ! $this->is_connected() ) { $data_store = Notes::load_data_store(); $note_ids = $data_store->get_notes_with_name( self::CONNECTION_NOTE_NAME ); if ( ! empty( $note_ids ) ) { // We already have a connection note. Exit early. return; } $this->remove_notes(); } }