This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php //This code can be placed in a plugin like My Custom Functions (just omit this top line when copying) | |
function add_additional_mailchimp_usermeta($args, $contact, $list_id) { | |
$date = get_user_meta($contact->ID, 'mepr_some_date_field', true); //mepr_some_date_field SHOULD BE REPLACED WITH YOUR date field's slug | |
$args['merge_vars']['MMERGE_77'] = $date; //MMERGE_77 SHOULD BE REPLACED WITH YOUR SPECIFIC MERGE FIELD NAME | |
return $args; | |
} | |
add_filter('mepr-mailchimp-add-subscriber-args', 'add_additional_mailchimp_usermeta', 11, 3); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* Enter Your Custom Functions Here */ | |
function get_the_pretty_link($post_id) { | |
global $plp_options, $prli_blogurl, $prli_link; | |
$post = get_post($post_id); | |
if(!($plp_options->autocreate_option($post->post_type))) { return false; } | |
$pretty_link_id = PrliUtils::get_prli_post_meta($post->ID, "_pretty-link", true); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* Enter Your Custom Functions Here */ | |
function mepr_autoembed_thankyou_message($message) { | |
global $wp_embed; | |
if(!class_exists('MeprTransaction')) { return $message; } | |
if(!isset($_REQUEST['trans_num'])) { return $message; } | |
$txn = new MeprTransaction(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php // Set up a custom page template in your theme, and choose that template for your MemberPress thank-you page. The following should be in that template. | |
if(isset($_GET['trans_num']) && ($txn = MeprTransaction::get_one_by_trans_num($_GET['trans_num']))): | |
?> | |
<img src="http://AFFILIATE-SITE.com/index.php?plugin=wafp&controller=transactions&action=track&amount=<?php echo $txn->amount; ?>&order_id=<?php echo $txn->id; ?>&prod_id=<?php echo $txn->product_id; ?>" width="1px" height="1px" style="display: none;" /> | |
<?php endif; ?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT l.name AS `name`, | |
l.id AS `id`, | |
IFNULL(g.name, 'None') AS `group`, | |
l.group_id AS `group_id`, | |
( | |
SELECT COUNT(*) | |
FROM wp_prli_clicks AS c | |
WHERE c.link_id = l.id | |
) AS `clicks`, | |
( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | |
<html xmlns="http://www.w3.org/1999/xhtml"> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> | |
<title>Test Access</title> | |
<script src="http://ajax.aspnetcdn.com/ajax/jquery/jquery-1.9.1.js" type="text/javascript"></script> | |
<script type="text/javascript"> | |
jQuery(document).ready(function($) { | |
var settings = { | |
async: true, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function listen_to_mepr_events($event) { | |
$obj = $event->get_data(); | |
//$obj might be a MeprTransaction object or a MeprSubscription object | |
if(!($obj instanceof MeprTransaction) && !($obj instanceof MeprSubscription)) { | |
return; // nothing here to do if we're not dealing with a txn or sub | |
} | |
$member = $obj->user(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
Plugin Name: MemberPress + UPME | |
Plugin URI: https://memberpress.com | |
Description: Activates UPME profiles when a user signs up via MemberPress. | |
Version: 1.0 | |
Author: Caseproof, LLC | |
Author URI: http://caseproof.com/ | |
Copyright: 2004-2014, Caseproof, LLC | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function mepr_add_address_to_paypal($args, $txn) { | |
$user_id = $txn->user_id; | |
$args['address1'] = get_user_meta($user_id, 'mepr-address-one', true); | |
$args['address2'] = get_user_meta($user_id, 'mepr-address-two', true); | |
$args['city'] = get_user_meta($user_id, 'mepr-address-city', true); | |
$args['country'] = get_user_meta($user_id, 'mepr-address-country', true); | |
$args['state'] = get_user_meta($user_id, 'mepr-address-state', true); | |
$args['zip'] = get_user_meta($user_id, 'mepr-address-zip', true); | |
return $args; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function validate_mepr_signup_via_banhammer($errors) { | |
if( class_exists('MeprOptions') && | |
class_exists('BanHammer') && | |
is_email($_POST['user_email']) && | |
((new BanHammer)->banhammer_drop($_POST['user_name'], $_POST['user_email'], (new WP_Error()))) | |
) { | |
$errors[] = (new BanHammer)->options['message']; | |
} |
OlderNewer