Automattic\WooCommerce\Internal\Admin

WcPaySubscriptionsPage::record_user_page_view()publicWC 1.0

Registers when a user views the WCPay Subscriptions screen.

Sets an option to prevent the notification badge from being displayed.

{} Это метод класса: WcPaySubscriptionsPage{}

Хуков нет.

Возвращает

null. Ничего.

Использование

$WcPaySubscriptionsPage = new WcPaySubscriptionsPage();
$WcPaySubscriptionsPage->record_user_page_view();

Код WcPaySubscriptionsPage::record_user_page_view() WC 6.6.1

public function record_user_page_view() {
	$current_page = PageController::get_instance()->get_current_page();

	if ( isset( $current_page['id'] ) && $current_page['id'] === $this->page_id ) {
		update_option( $this->user_viewed_option, 'yes' );
	}
}