[resolved] Share this not working. (8 posts)

  1. chetan0412
    Posted 2 years ago #


    After updating woocommerece to 2.0.14, share this is not working its showing error like .

    Warning: current() expects parameter 1 to be array, boolean given in /home/xxxxxxxx/public_html/xxxxxx/plugins/woocommerce/classes/integrations/sharethis/class-wc-sharethis.php on line 90 - See more at: http://example.com/?product=1600x200-display#sthash.fBZ9VANu.dpuf

    any solution?


  2. idoet
    Posted 2 years ago #

    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 ) : '';

  3. chetan0412
    Posted 2 years ago #

    Thanks idoet

    its working perfectly...

  4. One Inch Groups
    Posted 2 years ago #

    I had the same problem and it's been driving me crazy! Your solution worked perfectly! Thank you very much!

  5. randommess
    Posted 2 years ago #

    This solution was helpful but didn't work for me. The problem in mine is that it shouldn't say array. I downloaded the previous version and copied the old file. If it comes back in the next release, I'll move the copy of the old file to my theme folder.

    ver. 2.0.13 line 90 says:
    $thumbnail = ( $thumbnail_id = get_post_thumbnail_id( $post->ID ) ) ? current(wp_get_attachment_image_src( $thumbnail_id, 'large' )) : '';

  6. Tommy2225
    Posted 2 years ago #

    Thank you idoet, worked for me

  7. ConstraIT
    Posted 2 years ago #

    Ok so I am having a similar issue.
    I have woocommerce installed and it has share this section that asks me this:

    Share This Publisher ID: I have put this in correctly.

    Share This Code: `<!--<div class="social">
    <iframe src="https://www.facebook.com/plugins/like.php?href={permalink}&layout=button_count&show_faces=false&width=100&action=like&colorscheme=light&height=21" style="border:none;overflow:hidden;width:100px;height:21px"></iframe>
    <span class="st_twitter"></span><span class="st_email"></span><span class="st_sharethis"></span><span class="st_plusone_button"></span>

    This code was auto filled.

    My issue is when I go to my product and hit the share button nothing at all happens, in fact I can see this when I hover over it http://www.decalsandstickersalive/product/funny-car/#

    I have tried everything.... Please help you are my last hope :(

  8. ConstraIT
    Posted 2 years ago #

    BTW if you go to my website and hover over any of the products you will see they show extra options; whishlist, details and share, it is when you hit the share nothing happens. http://www.decalsandstickersalive.com

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • WooCommerce
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic


No tags yet.