• Resolved mariobastias

    (@mariobastias)


    I find a issue when i tried to use a external link (sorry my english).I dont know the version of php I was using, but I think is lower than 5.4

    Warning: Invalid argument supplied for foreach() in plugins/smart-variations-images/lib/class-svi-frontend.php on line 242

    Warning: Invalid argument supplied for foreach() in plugins/smart-variations-images/lib/class-svi-frontend.php on line 257

    The problem was that my product dont have any attributes so I solved add this line of code in “../plugins/smart-variations-images/lib/class-svi-frontend.php” in line 241, for check the array is not empty.

    240: $attributes = get_post_meta($pid, ‘_product_attributes’);
    241: if (!empty($attributes)){

    275: }//close the if (!empty)

    Hope I can help with my code. 🙂

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Issue when call a external product’ is closed to new replies.