Help with SQL commands to interact with a MySQL database
- Mac /usr/local/mysql/bin
- Windows /Program Files/MySQL/MySQL version/bin
- Xampp /xampp/mysql/bin
<?php | |
//Capture a new member signup. Only ever triggers once for each new member. | |
//Does not trigger for exising members who have subscribed to a Membership before. | |
// | |
//The user may not be logged in when this is called | |
//as it is triggered when a user is added over the REST API, | |
//and also when a user is added from the dashboard (MemberPress -> Members -> Add New) | |
function mepr_capture_new_member_signup_completed($event) { | |
$user = $event->get_data(); | |
$txn_data = json_decode($event->args); |
<?php | |
if(class_exists('MeprUtils')) { | |
$user = MeprUtils::get_currentuserinfo(); | |
if($user !== false && isset($user->ID)) { | |
//Returns an array of Membership ID's that the current user is active on | |
//Can also use 'products' or 'transactions' as the argument type | |
$active_prodcuts = $user->active_product_subscriptions('ids'); | |
if(!empty($active_prodcuts)) { |