I cant get this plugin to work, I keep getting this error..
Warning: Missing argument 2 for Bhu_C2S_subscription_add() in …/public_html/wp-content/plugins/bhu-c2s/Bhu_C2S.php on line 45
Any ideas? Line 45 begins with this:
function Bhu_C2S_subscription_add( $cid, $comment ) {
$cid = (int) $cid;
if ( !is_object($comment) )
$comment = get_comment($cid);
if ( $comment->comment_karma == 0 ) {
$subscribe = get_comment_meta($cid, 'mailchimp_subscribe', true);
if ( $subscribe == 'on' ) {
update_comment_meta($cid, 'mailchimp_subscribe', 'off');
/////////////////////////////////////
///////MailChimp////////////////////
///////////////////////////////////
$apikey = get_option('shamboapikey');
$listid = get_option('shambolistid');
$endpoint = 'https://'.get_option('shamboendpoint').'.api.mailchimp.com/1.3/?output=php';
$request = array(
'apikey' => $apikey,
'id' => $listid,
'email_address' => strtolower( $comment->comment_author_email ),
'double_optin' => true,
'merge_vars' => array(
' <merge tag for name> ' => $comment->comment_author,
'OPTIN_IP' => $comment->comment_author_IP,
)
);
$result = wp_remote_post(
$endpoint.'&method=listSubscribe',
array( 'body' => json_encode($request) )
);
/////////////////////////////////////
///////MailChimp Ended////////////////////
///////////////////////////////////
}
Best regards,
SNURK