function mp_custom_membership_info() { if (!is_user_logged_in()) { return ‘You need to be logged in to view this information.’; } global $wpdb; $user_id = get_current_user_id(); // Query to get all active MemberPress transactions for the current user $transactions = $wpdb->get_results($wpdb->prepare( “SELECT txn.*,…Continue reading
/** * After enabling this snippet, go to Settings > Permalinks and click “Save Changes” * Configure the $enabled_post_types array to specify which post types should support .md URLs */ $enabled_post_types = [ ‘post’, ‘page’ ]; // Add rewrite rule…Continue reading
function display_sub_account_users() { $user = MeprUtils::get_currentuserinfo(); $sub_user_ids = array(); $output = ”; if ($user !== false) { $transactions = $user->active_product_subscriptions(‘transactions’); if (!empty($transactions)) { foreach ($transactions as $txn) { if (($sub = $txn->subscription()) !== false) { // Recurring subscription $ca =…Continue reading
echo “hello World !”;Continue reading
// Abilita categorie (e, opzionalmente, tag) per le Pagine add_action(‘init’, function () { register_taxonomy_for_object_type(‘category’, ‘page’); // categorie per le pagine // register_taxonomy_for_object_type(‘post_tag’, ‘page’); // opzionale: tag per le pagine });Continue reading