add_action(‘mpca_remove_sub_account’, function($transaction_id) { $txn = new MeprTransaction($transaction_id); $user_id = $txn->user_id; // Get MeprUser object for the user $user = new MeprUser($user_id); // Get all subscriptions for the user $active_subs = $user->active_product_subscriptions(‘ids’, true); // Get active subscription IDs // Check if…Continue reading
function sd_edd_download_details_widget_thumbnail( $instance ) { $download_id = isset( $instance[‘download_id’] ) ? $instance[‘download_id’] : 0; if ( ‘current’ === $instance[‘display_type’] ) { $download_id = get_the_ID(); } if ( empty( $download_id ) || ! has_post_thumbnail( $download_id ) || ‘download’ !== get_post_type( $download_id…Continue reading
add_filter( ‘mepr-thankyou-page-url’, function( $url, $args ) { if( isset( $_POST[ ‘mepr_company_size’ ] ) && $_POST[ ‘mepr_company_size’ ] === ‘500+’ ) { return ‘https://mydomain.com/’; } return $url; }, 10, 2 );Continue reading
function mepr_exclude_sub_accounts( $atts, $content = “” ) { $user = MeprUtils::get_currentuserinfo(); if ($user === false) { return; } $ca_uuid = get_user_meta( $user->ID, ‘mpca_corporate_account_id’, true ); // If $ca_uuid has a value, in other words, not empty, then it’s a sub…Continue reading
add_shortcode( ‘mepr-membership-members’, function( $attributes ) { global $wpdb; // Check if a valid membership ID is provided if( isset( $attributes[‘id’] ) && is_numeric( $attributes[‘id’] ) ) { $membership_id = (int) $attributes[‘id’]; } else { return; // Return nothing if no…Continue reading
function auto_set_featured_image() { global $post; if (!has_post_thumbnail() && $post->post_type == ‘post’) { $attached_image = get_children(“post_parent=$post->ID&post_type=attachment&post_mime_type=image&numberposts=1”); if ($attached_image) { foreach ($attached_image as $attachment_id => $attachment) { set_post_thumbnail($post->ID, $attachment_id); break; } } } } add_action(‘save_post’, ‘auto_set_featured_image’);Continue reading
Welcome to Eckankar NJ Welcome to Eckankar in New Jersey Join free events and explore spiritual freedom.Continue reading
add_shortcode( ‘mepr-subaccount-link’, function() { global $wpdb; $user = MeprUtils::get_currentuserinfo(); if ( ! $user ) { return; } $subaccount_link = ”; $caid = get_user_meta( $user->ID, ‘mpca_corporate_account_id’, true ); if ( empty( $caid ) ) { $query = $wpdb->prepare( “SELECT uuid FROM…Continue reading