WordPress.org

Ready to get started?Download WordPress

Forums

WooCommerce - excelling eCommerce
Woocommerce: Warning Message On Product Pages (14 posts)

  1. wpempire
    Member
    Posted 10 months ago #

    The following warning message is appearing next to every product in the shop:

    Warning: current() expects parameter 1 to be array, boolean given in /home/content/83/11738983/html/wp-content/plugins/woocommerce/classes/integrations/sharethis/class-wc-sharethis.php on line 90

    **********
    Image of issue can be found here:

    http://support.yithemes.com/attachments/token/w8lylltdnuxe1nw/?name=screenshot+for+support+ticket.png

    http://wordpress.org/plugins/woocommerce/

  2. Terry
    Member
    Posted 10 months ago #

    I started to start a brand new thread, but this is same issue I am having so saw no need to clutter the forum.

    Anyone have any ideas why this is happening all of a sudden?

  3. wpempire
    Member
    Posted 10 months ago #

    Hey Terry, I sorted it out!

    Woocommerce > Settings > Integration > ShareThis

    Delete the ShareThis publisher ID code.

    This should solve the issue!

  4. Terry
    Member
    Posted 10 months ago #

    Thank you much wpempire! Appreciate you taking the time to share your solution.

    Terry

  5. chetan0412
    Member
    Posted 10 months ago #

    Hi,

    Deleting share this publisher id will remove its functionality.

    instead of this try below method.

    Maybe you can try this for temporary fix.
    Change plugins/woocommerce/classes/integrations/sharethis/class-wc-sharethis.php on line 90 to

    $thumbnail = is_array(( $thumbnail_id = get_post_thumbnail_id( $post->ID ) )) ? current( $attachment_image_src ) : '';

    this will solve your problem without affecting share this functionality.

  6. brandomb
    Member
    Posted 10 months ago #

    @chetan0412 Thanks so much for that little code snippet. Fixed my error message and kept my sharing functionality in tact! Awesome!

  7. Terry
    Member
    Posted 10 months ago #

    Thank you @chetan0412

    Had heck of time finding my pubID again (lol) but found it and your fix works great.

    Terry

  8. jhabs90
    Member
    Posted 9 months ago #

    Kind of a newbie, but have the same problem. Where do I go/what steps do I take to change this snippet of code?

    Thanks in advance! Much appreciated!

  9. Michael
    Member
    Posted 9 months ago #

    This also works for me, but when is this going to get updated in the Woocommerce source tree? I don't want to have to hack this every time an update comes out.

    Many thanks.
    Michael

  10. marcopolocompany
    Member
    Posted 9 months ago #

    That code was perfect , work for me
    thanks!

  11. parasite_sound
    Member
    Posted 9 months ago #

    Thank you @chetan0412

    Great fix!

  12. Damiaan van Vliet
    Member
    Posted 9 months ago #

    And worked also for me. It puzzled me a few days. Thank you @chetan0412

  13. sevenstreets
    Member
    Posted 9 months ago #

    Fixed! So glad you posted this!

    jhabs90 - you will need to use an FTP client like FileZilla to open the file, make the change, and re-upload it. Or you can use the editor in wordpress under plugins.

  14. jokret
    Member
    Posted 9 months ago #

    chetan0412, thank you very much, it solved my problem. Perfect.

Reply

You must log in to post.

About this Plugin

About this Topic