Skip to content

Commit 20f415b

Browse files
committed
Clarify memory impact
1 parent f08714c commit 20f415b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

includes/Generator/Coupon.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ public static function batch( $amount, array $args = array() ) {
151151
* @return \WC_Coupon|false Coupon object or false if none available.
152152
*/
153153
public static function get_random() {
154-
// Note: Using posts_per_page=-1 loads all coupons into memory for random selection.
154+
// Note: Using posts_per_page=-1 loads all coupon IDs into memory for random selection.
155155
// For stores with thousands of coupons, consider using direct SQL with RAND() for better performance.
156156
// This approach was chosen for consistency with WordPress APIs and to avoid raw SQL queries.
157157
$coupon_ids = get_posts(

0 commit comments

Comments
 (0)