SB WooCommerce Facebook Comments Plugin

February 5th, 2013 by Sean Leave a reply »

woocommerce_logoThis was requested by a commenter on a previous post on a similar subject. I have written in the past extensively about removing the WooCommerce reviews tab. It was suggested that Facebook comments might be an interesting addition and so I have written a very small plugin to add one.

The plugin simply removes the existing WooCommerce Reviews Tab and creates a new one called Reviews showing the Facebook comments system instead. Because the plugin is basic I have provided a few simple options in the code itself. You can configure the title of the tab, the width of the comment area and the number of comments to show.

Simply edit the PHP variables as follows:

$sb_fc_tab_title = 'Reviews';
$sb_fc_width = '600'; 
$sb_fc_comments = '50';

This is a tab called ‘Reviews’,  a width of 600 pixels and to show 50 comments. Edit to suit.

UPDATE: Updated my code for WooCommerce 2.0+.  Use the following link:

SB WooCommerce Facebook Comments for WooCommerce 2.0+ (693 bytes)

For PRE-WooCommerce 2.0 installations:

SB WooCommerce Facebook Comments (696 bytes)

Any comments or feedback by all means let me know

10 comments

  1. Jon says:

    this was exactly what I was trying to figure out, and thought I would have to pay for another plugin.

    thanks for sharing.

  2. Shanae Dykes says:

    Thank you so much!!! I really needed this solution. Also, thanks for the post showing how to remove the reviews tab :)

  3. fais says:

    I’ve tried your great plugin.. Woocommerce Facebook Plugin.. but when I changed the width in sb_woo_facebook_comments.php, the comment box’s widht didn’t change. What happen to it? Please your answer.

    Faisal, Indonesia

    • Sean says:

      In my tests you can make it wider and it does resize perfectly. Maybe a conflict elsewhere on the site… or you aren’t changing the right number maybe

  4. Shanae Dykes says:

    @ Fais, I had the same problem but realized after I deactivated the Woocommerce Facebook Like Share Button plugin, it worked. I was then able to adjust the size. So another plugin may be the culprit.

  5. Shanae Dykes says:

    I updated my woocommerce and not I’m getting an error where the review section is:

    Warning: uasort() [function.uasort]: The argument should be an array in /home/thewahss/public_html/shopateuphoria.com/wp-content/plugins/woocommerce/woocommerce-template.php on line 792

    This is the coding for line 792:

    uasort( $tabs, ‘_sort_priority_callback’ );

    • Sean says:

      Hi Shanae,

      Looks like maybe your theme is adding the related products as a tab or calling it before the WooCommerce tabs. However I have rewritten my plugin for you to work with Version 2.0+ now which will make things more smooth.

      See the post content above and download the appropriate file.

      thanks
      Sean

  6. Branimir says:

    Hi Sean,
    I installed the plugin but nothing happens? !
    All properly installed, nothing to fault it does not, there is simply no tabs displayed Facebook.
    Where I’m wrong?
    I have WC 2.0.5.

    Thanks
    B.

    • Sean says:

      Hey Branimir,

      Sorry it isn’t working. Maybe you have used the wrong version of my plugin for this? WooCommerce updated the tabbing system in V2.0+ so perhaps use the latest copy of my plugin which is available on the original post.

      ta
      S

  7. CRISTIANO says:

    in which file I insert this code?

Leave a Reply