WordPress at Your Fingertips
function is not described

WC_Privacy::delete_inactive_accounts() public WC 3.4.0

Delete inactive accounts.

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

No Hooks.

Return

Int. Number of users processed.

Usage

$result = WC_Privacy::delete_inactive_accounts( $limit );
$limit(int)
Limit users to process per batch.
Default: 20

Changelog

Since 3.4.0 Introduced.

Code of WC_Privacy::delete_inactive_accounts() WC 5.9.0

public static function delete_inactive_accounts( $limit = 20 ) {
	$option = wc_parse_relative_date_option( get_option( 'woocommerce_delete_inactive_accounts' ) );

	if ( empty( $option['number'] ) ) {
		return 0;
	}

	return self::delete_inactive_accounts_query( strtotime( '-' . $option['number'] . ' ' . $option['unit'] ), $limit );
}