We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f08714c commit 20f415bCopy full SHA for 20f415b
includes/Generator/Coupon.php
@@ -151,7 +151,7 @@ public static function batch( $amount, array $args = array() ) {
151
* @return \WC_Coupon|false Coupon object or false if none available.
152
*/
153
public static function get_random() {
154
- // Note: Using posts_per_page=-1 loads all coupons into memory for random selection.
+ // Note: Using posts_per_page=-1 loads all coupon IDs into memory for random selection.
155
// For stores with thousands of coupons, consider using direct SQL with RAND() for better performance.
156
// This approach was chosen for consistency with WordPress APIs and to avoid raw SQL queries.
157
$coupon_ids = get_posts(
0 commit comments