add_action( 'mepr_before_account_subscriptions' )
$tables = MeprHooks::apply_filters(
'mepr_db_tables',
array(
'events',
'jobs',
'members',
'subscriptions',
'subscription_meta',
'tax_rates',
'tax_rate_locations',
'transactions',
'transaction_meta',
'rule_access_conditions',
)
);
$mepr_db = new MeprDb();
Events txn_expired($txn, $sub_status) {}
$meprEvent = new MeprEventsCtrl; _action('mepr-txn-expired', array($meprEvent, 'txn_expired'), 10, 2);
line 28 in `MeprEventsCtrl`
array(
'id' => 0,
'args' => null,
'event' => 'login',
'evt_id' => 0,
'evt_id_type' => 'users',
'created_at' => null
),
$obj
send the object associated with the event
case $users_str:
$obj = new MeprUser($this->evt_id);
Subscriptions class MeprSubscription $subscr = new MeprSubscription($s->id);
- MeprTrans()-> get_one_by_subscription_id($subscription_id)
- action view mepr_account_subscriptions_sub_account_terms
- filter view mepr-account-subscr-product-name', $prd->post_title, $txn)
- action mepr_account_subscriptions_sub_account_auto_rebill
- action mepr_subscription_transition_status', $old_sub->status, $this->status, $this
- action mepr_subscription_stored', $this
- action mepr_subscription_saved
- action 'mepr_subscription_status_{status}
- filter mepr_create_subscription
- filter mepr_update_subscription($db_args,$args,$user_id)
- action mepr_subscription_pre_delete
- action mepr_subscription_deleted
- action mepr-limit-payment-cycles-reached
- action mepr-changing-subscription
- action mepr_subscriptions mepr_lifetime_subscriptions
- filter mepr_subscription_email_params
Also
$nba = $sub->next_billing_at
MeprUser()->get_user_product_signup_date($user_id, $product_id)
MeprUser()->get_user_product_expires_at_date($user_id, $product_id, $return_txn = false)
if(isset($_REQUEST['subscription']) && is_numeric($_REQUEST['subscription'])) {
$sub = new MeprSubscription($_REQUEST['subscription']);
$usr = $sub->user();
$prd = $sub->product();
$user_login = $usr->user_login;
$subscr_num = $sub->subscr_id;
$txn->product_id = $sub->product_id;
}
$current_subscriptions->active_product_subscriptions('ids')
top
Transactions $txn = new MeprTransaction($_POST['id']);
function update_txn($txn) {$txn->product_id = sanitize_key($_POST['product_id']);}
- mepr_send_txn_expire_events
- $schedules mepr_send_txn_expire_events_interval
- filter mepr_transaction_email_params
- invoice filters mepr-invoice-html
- filter mepr_update_transaction
- get_one_by_trans_num compact('trans_num')
- static get_expired_txns() {} @uses return $res
$txns = MeprTransaction::get_all_complete_by_user_id( $usr->ID,
'created_at DESC',
$expires_at_ts = $prd->get_expires_at(strtotime($_REQUEST['created_at']))
$user = new MeprUser();$usr = new MeprUser($_REQUEST['uid']);
if($geo_country = get_user_meta($user->ID, 'mepr-geo-country', true))
- action show_user_profile' Ctrl extra-profile_fields;
- _action edit_user_profile
- personal_options_update
- edit_user_profile_update/user_profile_update_errors
- filter manage_users_columns
- manage_users_sortable_columns
- MeprUsersCtrl::manage_extra_user_columns'
- MeprHooks::_action('mepr_user_account_saved', $user)
- update_user_meta($user_id, $line->field_key, '')
- filter mepr_user_notification_params
- filter mepr_user_email_params
- Custom user fields_filters( 'mepr_custom_field_html
- MeprUser::get_user_product_expires_at_date($user->ID, $id, true)
mepr_resend_welcome_email
static function email_users_with_expiring_transactions()
_shortcode('mepr-list-subscriptions', 'MeprUsersCtrl::list_users_subscriptions)
$product = new MeprProduct($product_id);
$active_products = $this->active_product_subscriptions('products')
add_shortcode('mepr-product-link', 'MeprProductsCtrl::shortcode_product_link'); // DEPRECATED
add_shortcode('mepr-product-registration-form', 'MeprProductsCtrl::shortcode_registration_form'); // DEPRECATED
add_shortcode('mepr-product-purchased', 'MeprProductsCtrl::shortcode_if_product_was_purchased'); // DEPRECATED
add_shortcode('mepr-product-access-url', 'MeprProductsCtrl::shortcode_access_url_link'); // DEPRECATED
add_shortcode('mepr-membership-link', 'MeprProductsCtrl::shortcode_product_link');
add_shortcode('mepr-membership-registration-form', 'MeprProductsCtrl::shortcode_registration_form');
add_shortcode('mepr-membership-purchased', 'MeprProductsCtrl::shortcode_if_product_was_purchased');
add_shortcode('mepr-membership-access-url', 'MeprProductsCtrl::shortcode_access_url_link');
add_action('wp_ajax_mepr_get_product_price_str', 'MeprProductsCtrl::get_price_str_ajax');
//$prod_id = do_shortcode( '[mepr-product-purchased field="ID"]' );
- Membership productmepr-product-expire-fixed mepr-sub-box
<input class="mepr-date-picker hasDatepicker" name="_mepr_expire_fixed" id="_mepr_expire_fixed" value="2019-09-01" type="text">
function($txn) $product_expiration = $product->get_expires_at(strtotime($txn->created_at));
$prd = new MeprProduct; $prd->get_one($_REQUEST['product_id']))
get_option('mepr_calculate_taxes')
$mepr_options = MeprOptions::fetch();
return $mepr_options->account_page_url;
calculate_subtotal()
top