• Resolved rottolina

    (@rottolina)


    when I try to activate:
    Plugin could not be activated because it triggered a fatal error.
    Parse error: syntax error, unexpected ‘[‘ in /var/www/www.avg.it/dev/public/wp-content/plugins/woo-variations-table/woo-variations-table.php on line 204

    It seems it doesn’t like the “[0]”
    if I try to delete it (!) a new error rise at line 227
    always brackets… [$i]

    any help really appreciated!

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Alaa Rihan

    (@alaa-rihan)

    Hi,

    it seems your server use an old version of PHP

    Try replace this in woo-variations-table/woo-variations-table.php line 204:
    $productImageURL = wp_get_attachment_image_src(get_post_thumbnail_id( $product->get_id() ), $thumb_name)[0];

    with this:

    $productImageURL = wp_get_attachment_image_src(get_post_thumbnail_id( $product->get_id() ),  $thumb_name);
    if (is_array($productImageURL) && count($productImageURL)){
      $productImageURL = $productImageURL[0];
    }

    tell me if it worked or not please.

    Plugin Author Alaa Rihan

    (@alaa-rihan)

    Closing until I get answer from you.

    Thread Starter rottolina

    (@rottolina)

    Thank you Alaa,

    this fixed for line 204 but

    Parse error: syntax error, unexpected ‘[‘ in /var/www/www.avg.it/dev/public/wp-content/plugins/woo-variations-table/woo-variations-table.php on line 231

    line 231: $term = get_term_by(‘slug’, array_values($name)[$i], $key);

    it really seems a problem on arrays!

    let me know & thank you!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Plugin do not activate’ is closed to new replies.