Skip to content

Commit 9004e7c

Browse files
committed
Changed limit to PHP_INT_MAX to prevent missing out things
1 parent f0d1e24 commit 9004e7c

6 files changed

+9
-9
lines changed

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
Query Order after this date. ISO 8601 format.
2828
2929
[--limit]
30-
Limit the total number of orders to process. Set to 1000 by default.
30+
Limit the total number of orders to process. Set to PHP_INT_MAX by default.
3131
3232
[--perpage]
3333
Limit the number of orders to process each time.
@@ -78,7 +78,7 @@
7878
Query Order after this date. ISO 8601 format.
7979
8080
[--limit]
81-
Limit the total number of orders to process. Set to 1000 by default.
81+
Limit the total number of orders to process. Set to PHP_INT_MAX by default.
8282
8383
[--perpage]
8484
Limit the number of orders to process each time.
@@ -132,7 +132,7 @@ wp import_stripe_data_into_woopayments [--limit]
132132
OPTIONS
133133
134134
[--limit]
135-
: Limit the total number of coupons to process. This won't count the sub codes. Default to 1000.
135+
: Limit the total number of coupons to process. This won't count the sub codes. Default to PHP_INT_MAX.
136136
137137
Example
138138
wp import_stripe_data_into_woopayments --limit=1
@@ -168,7 +168,7 @@ wp import_stripe_data_into_woopayments [--limit]
168168
OPTIONS
169169
170170
[--limit]
171-
: Limit the total number of coupons to process. This won't count the sub codes. Default to 1000.
171+
: Limit the total number of coupons to process. This won't count the sub codes. Default to PHP_INT_MAX.
172172
173173
[--cursor]
174174
: The cursor of the last discount to start importing from

includes/class-migrator-cli-coupons.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ class Migrator_CLI_Coupons {
1010
*/
1111
public function import( $assoc_args ) {
1212
$imported = 0;
13-
$limit = isset( $assoc_args['limit'] ) ? $assoc_args['limit'] : 1000;
13+
$limit = isset( $assoc_args['limit'] ) ? $assoc_args['limit'] : PHP_INT_MAX;
1414
$cursor = isset( $assoc_args['cursor'] ) ? $assoc_args['cursor'] : '';
1515

1616
do {

includes/class-migrator-cli-order-tags.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ public function fix_missing_order_tags( $assoc_args ) {
1313
$dry_run = isset( $assoc_args['dry-run'] ) ? true : false;
1414
$before = isset( $assoc_args['before'] ) ? $assoc_args['before'] : null;
1515
$after = isset( $assoc_args['after'] ) ? $assoc_args['after'] : null;
16-
$limit = isset( $assoc_args['limit'] ) ? $assoc_args['limit'] : 1000;
16+
$limit = isset( $assoc_args['limit'] ) ? $assoc_args['limit'] : PHP_INT_MAX;
1717
$perpage = isset( $assoc_args['perpage'] ) ? $assoc_args['perpage'] : 50;
1818
$perpage = min( $perpage, $limit );
1919
$next_link = isset( $assoc_args['next'] ) ? $assoc_args['next'] : '';

includes/class-migrator-cli-orders.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ public function migrate_orders( $assoc_args ) {
2222

2323
$before = isset( $assoc_args['before'] ) ? $assoc_args['before'] : null;
2424
$after = isset( $assoc_args['after'] ) ? $assoc_args['after'] : null;
25-
$limit = isset( $assoc_args['limit'] ) ? $assoc_args['limit'] : 1000;
25+
$limit = isset( $assoc_args['limit'] ) ? $assoc_args['limit'] : PHP_INT_MAX;
2626
$perpage = isset( $assoc_args['perpage'] ) ? $assoc_args['perpage'] : 250;
2727
$perpage = min( $perpage, $limit );
2828
$next_link = isset( $assoc_args['next'] ) ? $assoc_args['next'] : '';

includes/class-migrator-cli-payment-methods.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ public function import_stripe_data_into_woopayments( $assoc_args ) {
2525
die();
2626
}
2727

28-
$limit = isset( $assoc_args['limit'] ) ? $assoc_args['limit'] : 1000;
28+
$limit = isset( $assoc_args['limit'] ) ? $assoc_args['limit'] : PHP_INT_MAX;
2929
$perpage = min( 100, $limit );
3030

3131
$starting_after = '';

includes/class-migrator-cli-products.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ public function migrate_products( $assoc_args ) {
2828

2929
$before = isset( $assoc_args['before'] ) ? $assoc_args['before'] : null;
3030
$after = isset( $assoc_args['after'] ) ? $assoc_args['after'] : null;
31-
$limit = isset( $assoc_args['limit'] ) ? $assoc_args['limit'] : 1000;
31+
$limit = isset( $assoc_args['limit'] ) ? $assoc_args['limit'] : PHP_INT_MAX;
3232
$perpage = isset( $assoc_args['perpage'] ) ? $assoc_args['perpage'] : 50;
3333
$perpage = min( $perpage, $limit );
3434
$next_link = isset( $assoc_args['next'] ) ? $assoc_args['next'] : '';

0 commit comments

Comments
 (0)