Remove defaults
This commit is contained in:
parent
fdf086cbfc
commit
30ba25d535
|
@ -105,10 +105,7 @@ class WC_Settings_Accounts extends WC_Settings_Page {
|
||||||
'id' => 'woocommerce_trash_pending_orders',
|
'id' => 'woocommerce_trash_pending_orders',
|
||||||
'type' => 'relative_date_selector',
|
'type' => 'relative_date_selector',
|
||||||
'placeholder' => __( 'N/A', 'woocommerce' ),
|
'placeholder' => __( 'N/A', 'woocommerce' ),
|
||||||
'default' => array(
|
'default' => '',
|
||||||
'number' => 30,
|
|
||||||
'unit' => 'days',
|
|
||||||
),
|
|
||||||
'autoload' => false,
|
'autoload' => false,
|
||||||
),
|
),
|
||||||
array(
|
array(
|
||||||
|
@ -117,10 +114,7 @@ class WC_Settings_Accounts extends WC_Settings_Page {
|
||||||
'id' => 'woocommerce_trash_failed_orders',
|
'id' => 'woocommerce_trash_failed_orders',
|
||||||
'type' => 'relative_date_selector',
|
'type' => 'relative_date_selector',
|
||||||
'placeholder' => __( 'N/A', 'woocommerce' ),
|
'placeholder' => __( 'N/A', 'woocommerce' ),
|
||||||
'default' => array(
|
'default' => '',
|
||||||
'number' => 30,
|
|
||||||
'unit' => 'days',
|
|
||||||
),
|
|
||||||
'autoload' => false,
|
'autoload' => false,
|
||||||
),
|
),
|
||||||
array(
|
array(
|
||||||
|
@ -129,10 +123,7 @@ class WC_Settings_Accounts extends WC_Settings_Page {
|
||||||
'id' => 'woocommerce_trash_cancelled_orders',
|
'id' => 'woocommerce_trash_cancelled_orders',
|
||||||
'type' => 'relative_date_selector',
|
'type' => 'relative_date_selector',
|
||||||
'placeholder' => __( 'N/A', 'woocommerce' ),
|
'placeholder' => __( 'N/A', 'woocommerce' ),
|
||||||
'default' => array(
|
'default' => '',
|
||||||
'number' => 30,
|
|
||||||
'unit' => 'days',
|
|
||||||
),
|
|
||||||
'autoload' => false,
|
'autoload' => false,
|
||||||
),
|
),
|
||||||
array(
|
array(
|
||||||
|
|
|
@ -89,7 +89,7 @@ class WC_Privacy {
|
||||||
self::$background_process->push_to_queue( array( 'task' => 'trash_pending_orders' ) );
|
self::$background_process->push_to_queue( array( 'task' => 'trash_pending_orders' ) );
|
||||||
self::$background_process->push_to_queue( array( 'task' => 'trash_failed_orders' ) );
|
self::$background_process->push_to_queue( array( 'task' => 'trash_failed_orders' ) );
|
||||||
self::$background_process->push_to_queue( array( 'task' => 'trash_cancelled_orders' ) );
|
self::$background_process->push_to_queue( array( 'task' => 'trash_cancelled_orders' ) );
|
||||||
//self::$background_process->push_to_queue( array( 'task' => 'anonymize_completed_orders' ) );
|
// self::$background_process->push_to_queue( array( 'task' => 'anonymize_completed_orders' ) );.
|
||||||
self::$background_process->save()->dispatch();
|
self::$background_process->save()->dispatch();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -101,10 +101,7 @@ class WC_Privacy {
|
||||||
* @return int Number of orders processed.
|
* @return int Number of orders processed.
|
||||||
*/
|
*/
|
||||||
public static function trash_pending_orders( $limit = 20 ) {
|
public static function trash_pending_orders( $limit = 20 ) {
|
||||||
$option = wc_parse_relative_date_option( get_option( 'woocommerce_trash_pending_orders', array(
|
$option = wc_parse_relative_date_option( get_option( 'woocommerce_trash_pending_orders' ) );
|
||||||
'number' => 30,
|
|
||||||
'unit' => 'days',
|
|
||||||
) ) );
|
|
||||||
|
|
||||||
if ( empty( $option['number'] ) ) {
|
if ( empty( $option['number'] ) ) {
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -125,10 +122,7 @@ class WC_Privacy {
|
||||||
* @return int Number of orders processed.
|
* @return int Number of orders processed.
|
||||||
*/
|
*/
|
||||||
public static function trash_failed_orders( $limit = 20 ) {
|
public static function trash_failed_orders( $limit = 20 ) {
|
||||||
$option = wc_parse_relative_date_option( get_option( 'woocommerce_trash_failed_orders', array(
|
$option = wc_parse_relative_date_option( get_option( 'woocommerce_trash_failed_orders' ) );
|
||||||
'number' => 30,
|
|
||||||
'unit' => 'days',
|
|
||||||
) ) );
|
|
||||||
|
|
||||||
if ( empty( $option['number'] ) ) {
|
if ( empty( $option['number'] ) ) {
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -149,10 +143,7 @@ class WC_Privacy {
|
||||||
* @return int Number of orders processed.
|
* @return int Number of orders processed.
|
||||||
*/
|
*/
|
||||||
public static function trash_cancelled_orders( $limit = 20 ) {
|
public static function trash_cancelled_orders( $limit = 20 ) {
|
||||||
$option = wc_parse_relative_date_option( get_option( 'woocommerce_trash_cancelled_orders', array(
|
$option = wc_parse_relative_date_option( get_option( 'woocommerce_trash_cancelled_orders' ) );
|
||||||
'number' => 30,
|
|
||||||
'unit' => 'days',
|
|
||||||
) ) );
|
|
||||||
|
|
||||||
if ( empty( $option['number'] ) ) {
|
if ( empty( $option['number'] ) ) {
|
||||||
return 0;
|
return 0;
|
||||||
|
|
Loading…
Reference in New Issue