Account Creation
\MySLP_DSRA::add_account()
Calls \MySLP_Recurring_Payments::add_payment_data()
Params include the user_id and the new payment data array:
Array
(
[customer_details] => Array
(
[id] => cus_RcHfOPMYNHRgo7
[object] => customer
[address] =>
[balance] => 0
[created] => 1737310780
[currency] =>
[default_source] =>
[delinquent] =>
[description] =>
[discount] =>
[email] => test14@lancecleveland.com
[invoice_prefix] => 2FDC81BB
[invoice_settings] => Array
(
[custom_fields] =>
[default_payment_method] =>
[footer] =>
[rendering_options] =>
)
[livemode] =>
[metadata] => Array
(
)
[name] => Lance Cleveland
[next_invoice_sequence] => 1
[phone] =>
[preferred_locales] => Array
(
)
[shipping] =>
[tax_exempt] => none
[test_clock] =>
)
[latest_response_code] => 200
[coupon_code] =>
[PROCESSOR] => stripe
[PROFILEID] => sub_1Qj360BvHKfBw2LG0LkOaHbg
[STATUS] => active
[PROFILESTARTDATE] => 19 January 2025 18:19:40
[NEXTBILLINGDATE] => 19 February 2025 18:19:40
[LASTPAYMENTDATE] => 19 January 2025 18:19:40
[LASTPAYMENTAMT] => 35
[DESC] => Professional plan billed $35.00 per month
[PLAN] => Professional
[AMT] => 35
[PERIOD] => month
[IS_GOOD] => 1
[status] => succeeded
[referring_site] =>
)
Subscription Creation
\stripe\MySLP_Stripe_Payments::create_subscription()
Creates a Stripe Customer.
Creates a Stripe Subscription.
Returns a subscription data array
Array
(
[customer_details] => Array
(
[id] => cus_RcHfOPMYNHRgo7
[object] => customer
[address] =>
[balance] => 0
[created] => 1737310780
[currency] =>
[default_source] =>
[delinquent] =>
[description] =>
[discount] =>
[email] => test14@lancecleveland.com
[invoice_prefix] => 2FDC81BB
[invoice_settings] => Array
(
[custom_fields] =>
[default_payment_method] =>
[footer] =>
[rendering_options] =>
)
[livemode] =>
[metadata] => Array
(
)
[name] => Lance Cleveland
[next_invoice_sequence] => 1
[phone] =>
[preferred_locales] => Array
(
)
[shipping] =>
[tax_exempt] => none
[test_clock] =>
)
[latest_response_code] => 200
[coupon_code] =>
[PROCESSOR] => stripe
[PROFILEID] => sub_1Qj360BvHKfBw2LG0LkOaHbg
[STATUS] => active
[PROFILESTARTDATE] => 19 January 2025 18:19:40
[NEXTBILLINGDATE] => 19 February 2025 18:19:40
[LASTPAYMENTDATE] => 19 January 2025 18:19:40
[LASTPAYMENTAMT] => 35
[DESC] => Professional plan billed $35.00 per month
[PLAN] => Professional
[AMT] => 35
[PERIOD] => month
[IS_GOOD] => 1
[status] => succeeded
)
Subscription Details
Map Views
These are coming from $myslp->User->mapview_count.
This is coming from \MySLP_User::mapview_count which is managed with magic method setters and getters. The data is stored in the user_meta object within \MySLP_User in a key names “mapview_count”.
Incrementing Map View Counts
This count is updated whenever \MySLP_REST_API::get_map_options() is called (theoretically/assumed to be whenever the map is rendered).
Resetting Map View Count
This is reset to 0 via \myslp_extend_plan() within the myslp-dashboard-helpers module.
Called By
- \MySLP_Dashboard_Controller::check_subscription()
Runs when a subscription status is checked, has expired, and is renewed automatically.- \myslp_extend_plan()
- \MySLP_Recurring_Payments::initialize()
ONLY if payment type is PayPal…- \MySLP_Recurring_Payments::get_paypal_checkout_details()
- \myslp_extend_plan()
- \MySLP_Recurring_Payments::get_paypal_checkout_details()
- WPSLP Hook personal_options_update or WPSLP Hook : edit_user_profile_update
- \MySLP_Customer_Maintenance::update_myslp_profile_management()
- \myslp_extend_plan()
- \MySLP_Customer_Maintenance::update_myslp_profile_management()
Payment Info : \MySLP_User::recurring_payments
Your Sites
These are coming from the user meta “user_subscription_status” key as a subarray named “referer_urls”.
\MySLP_User::log_referer()
This adds to the list of referring URLs any time a map URL is requested.
If you look through the documentation (or code) for the slp_rest_geocode_invalid_referer hook, you will see that this is only called when running a geocoding request.
This means that up to the current 2501.XX.YY release of MySLP, the list of sites only shows sites where a geocoding request was called from. This is NOT necessarily all the sites that have requested that a map be displayed.
Used By
- \MySLP::log_and_validate_referer()
This is executed via the WordPress hook (filter) slp_rest_geocode_invalid_referer