WC_Privacy::delete_inactive_accounts()
Delete inactive accounts.
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. |
WC_Privacy::delete_inactive_accounts() WC Privacy::delete inactive accounts code WC 9.2.3
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 ); }