WordPress at a glance
function is not described

Automattic\WooCommerce\Admin\Notes

WooSubscriptionsNotes::check_connection() public WC 1.0

Checks the connection. Adds a note (as necessary) if there is no connection.

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

No Hooks.

Return

null. Nothing.

Usage

$WooSubscriptionsNotes = new WooSubscriptionsNotes();
$WooSubscriptionsNotes->check_connection();

Code of WooSubscriptionsNotes::check_connection() WC 5.3.0

<?php
public function check_connection() {
	if ( ! $this->is_connected() ) {
		$data_store = \WC_Data_Store::load( 'admin-note' );
		$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();
		$this->add_no_connection_note();
	}
}