Warning: invalid argument supplied foreach()
-
When using variable pricing, throws an error in dashboard when displaying user’s downloads:
Warning: Invalid argument supplied for foreach() in /home/oururl/public_html/wp-content/plugins/edd-sale-price/includes/class-eddsp-sale-price.php on line 93
Fix we added seems to work, please review and merge?
if (is_array($prices)) { //added by 1wd foreach ( $prices as $key => $price ) : if ( isset( $price['sale_price'] ) && ! empty( $price['sale_price'] ) ) : $prices[ $key ]['regular_amount'] = $price['amount']; $prices[ $key ]['amount'] = $price['sale_price']; endif; endforeach; } // added by 1wd
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘Warning: invalid argument supplied foreach()’ is closed to new replies.