Support » Plugin: Simple Facebook Connect » [Plugin: Simple Facebook Connect] Share button conflicts with Shopp

  • I’ve run into a conflict with the SFC Share button and the Shopp plugin. Here’s the work-around I’ve come up with. I was hoping that maybe a better fix could be implemented. Not sure if SFC or Shopp is the real “culprit”, so I’m posting in both the SFC and Shopp (commercial plugin) forums.

    // Remove sfc_share_meta() action on Shopp pages, because it(?) breaks Shopp's login validation notices when trying to log in.
    // As of SFC - Share Button Version v0.25, the offending code is: sfc-share.php line 211: $content = apply_filters('the_content', $content);
    // WP v3.05, Shopp v1.1.7
    // Add this code to your theme's functions.php
    function remove_sfc_share_meta() {
    	// Normally, I'd set get the special Shopp page ids from a theme options panel, but I hard coded them here for the example
    	$my_account_page_id = 100;
    	$checkout_page_id = 102;
    	if ( is_page( $my_account_page_id ) || is_page( $checkout_page_id ) ) {
    		remove_action( 'wp_head', 'sfc_share_meta' );
    add_action( 'wp_head', 'remove_sfc_share_meta', 9 ); // make sure to fire it before the default priority of 10

    I’m not exactly sure why this is happening, but wanted to share my workaround anyway. On the Shopp end of things, when a login error occurs, a new ShoppError object is instantiated, formatted with the Shopp template errors.php, and displayed inside the content area (where the [account] or [checkout] shortcodes are present.


    new ShoppError(__("The password is incorrect.","Shopp"),'invalid_password',SHOPP_AUTH_ERR);

    errors.php template

    <div id="errors" class="shopp">
    		<?php shopp('checkout','errors'); ?>

    I’m only using the SFC Share sub-module. It may be possible that other sub modules also conflict with Shopp. The SFC Base module does not cause a problem. It’s also worth noting that I’m using the Simple Twitter Connect base plugin and Tweet Button, which do not exhibit this problem.

    Hope this helps someone!

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘[Plugin: Simple Facebook Connect] Share button conflicts with Shopp’ is closed to new replies.