WC_Helper::disconnect()
Handles WC Helper disconnect tasks.
Method of the class: WC_Helper{}
No Hooks.
Returns
null
. Nothing (null).
Usage
$result = WC_Helper::disconnect();
WC_Helper::disconnect() WC Helper::disconnect code WC 9.8.5
public static function disconnect() { WC_Helper_API::post( 'oauth/invalidate_token', array( 'authenticated' => true, ) ); $data = WC_Helper_Options::get( 'auth_user_data' ); WC_Helper_Options::update( 'last_disconnected_user_data', $data ); // Ignore all previously dismissed disconnect notices. delete_metadata( 'user', 0, PluginsHelper::DISMISS_DISCONNECT_NOTICE, '', true ); WC_Helper_Options::update( 'auth', array() ); WC_Helper_Options::update( 'auth_user_data', array() ); self::_flush_subscriptions_cache(); self::_flush_updates_cache(); self::flush_product_usage_notice_rules_cache(); }