Classes
UM_Stripe_API
final
Class UM_Stripe_API
Extends | um_ext\um_stripe\Functions |
Implements | Nothing |
Uses | Nothing |
Constants
This class has not constants.
Methods
Inherited methods
Properties
Inherited properties
UM_Stripe_Plugin
Class Plugin
Extends | Nothing |
Implements | Nothing |
Uses | Nothing |
Constants
This class has not constants.
Methods
admin_notice_activation_hook ( )
Runs only when the plugin is activated.
public function admin_notice_activation_hook( ) : void
Since | v0.1.0 |
Function to add links to the plugin action links
public function plugin_action_links( array $links ) : void
Parameter | Type(s) | Description |
---|---|---|
$links | array | Array of links to be shown in plugin action links. |
Inherited methods
This class has not inherited methods.
Properties
This class has not properties.
Inherited properties
This class has not inherited properties.
um_ext\um_stripe\admin\Content_Restriction
Class Enqueue
Extends | Nothing |
Implements | Nothing |
Uses | Nothing |
Constants
This class has not constants.
Methods
Get Fields settings
public function get_fields( array $data ) : void
Parameter | Type(s) | Description |
---|---|---|
$data | array | individual field settings. |
Since | v1.0.0 |
Posts/Pages Settings
public function post_settings_fields( array $fields, array $data, object $obj, object $post_type_object ) : void
Parameter | Type(s) | Description |
---|---|---|
$fields | array | all field settings. |
$data | array | individual field settings. |
$obj | object | class objects. |
$post_type_object | object | individual post object. |
Since | v1.0.0 |
Taxonomy Settings
public function taxonomy_settings_fields( array $fields, array $data, string $action ) : void
Parameter | Type(s) | Description |
---|---|---|
$fields | array | all field settings. |
$data | array | individual field settings. |
$action | string | action name. |
Since | v1.0.0 |
Inherited methods
This class has not inherited methods.
Properties
This class has not properties.
Inherited properties
This class has not inherited properties.
um_ext\um_stripe\admin\Enqueue
Class Enqueue
Extends | Nothing |
Implements | Nothing |
Uses | Nothing |
Constants
This class has not constants.
Methods
Include admin scripts for um_form post type screen
public function um_form_screen( string $hook ) : void
Parameter | Type(s) | Description |
---|---|---|
$hook | string | page hook. |
Since | v1.0.0 |
Enqueue scripts
public function wp_enqueue_scripts( string $hook ) : void
Parameter | Type(s) | Description |
---|---|---|
$hook | string | page hook. |
Since | v1.0.0 |
Enqueue Stripe script
public function wp_enqueue_stripe_script( string $hook ) : void
Parameter | Type(s) | Description |
---|---|---|
$hook | string | page hook. |
Since | v1.0.0 |
wp_enqueue_stripe_script_users ( )
Enqueue Scripts to the users.php screen.
public function wp_enqueue_stripe_script_users( string $hook ) : void
Parameter | Type(s) | Description |
---|---|---|
$hook | string | page hook. |
Since | v1.0.0 |
Inherited methods
This class has not inherited methods.
Properties
This class has not properties.
Inherited properties
This class has not inherited properties.
um_ext\um_stripe\admin\Init
Class Init
Extends | Nothing |
Implements | Nothing |
Uses | Nothing |
Constants
This class has not constants.
Methods
Class Content_Restriction
public function content_restriction( ) : \um_ext\um_stripe\admin\Content_Restriction()
Since | v1.0.0 |
Class Logs_Table
public function logs_table( ) : \um_ext\um_stripe\admin\Logs_Table()
Since | v1.2.8 |
Class Settings
public function settings( ) : \um_ext\um_stripe\admin\Settings()
Since | v1.0.0 |
Class Site_Health
public function site_health( ) : \um_ext\um_stripe\admin\Site_Health()
Since | v1.0.0 |
Class Subscriptions_Table
public function subscriptions_table( ) : \um_ext\um_stripe\admin\Subscriptions_Table()
Since | v1.2.8 |
Class User_Columns
public function user_columns( ) : \um_ext\um_stripe\admin\User_Columns()
Since | v1.0.0 |
Inherited methods
This class has not inherited methods.
Properties
This class has not properties.
Inherited properties
This class has not inherited properties.
um_ext\um_stripe\admin\Logs_Table
Create a new table class that will extend the WP_List_Table
Extends | \ |
Implements | Nothing |
Uses | Nothing |
Constants
This class has not constants.
Methods
Define what data to show on each column of the table
public function column_default( Array $item, String $column_name ) : Mixed
Parameter | Type(s) | Description |
---|---|---|
$item | Array | Data. |
$column_name | String | - Current column name. |
Override the parent columns method. Defines the columns to use in your listing table
public function get_columns( ) : void
get_hidden_columns ( )
Define which columns are hidden
public function get_hidden_columns( ) : Array
Allows you to sort the data by the variables set in the $_REQUEST
private function sort_data( string $a, string $b ) : Mixed
Parameter | Type(s) | Description |
---|---|---|
$a | string | Search query. |
$b | string | Search query. |
Inherited methods
This class has not inherited methods.
Properties
This class has not properties.
Inherited properties
This class has not inherited properties.
um_ext\um_stripe\admin\Menu
Class Menu
Extends | Nothing |
Implements | Nothing |
Uses | Nothing |
Constants
This class has not constants.
Methods
Add settings page for group's members
public function extend_admin_menu( ) : void
Since | v1.0.0 |
Show Subscriptions Table
public function show_subscriptions( ) : void
Since | v1.2.8 |
Inherited methods
This class has not inherited methods.
Properties
This class has not properties.
Inherited properties
This class has not inherited properties.
um_ext\um_stripe\admin\Metabox
Class Metabox
Extends | Nothing |
Implements | Nothing |
Uses | Nothing |
Constants
This class has not constants.
Methods
Add metaboxes with options to Add/Edit Profile Tab screen
public function add_metabox( ) : void
Since | v1.0.0 |
Add extra user profile fields.
public function extra_user_profile_fields( object $user ) : void
Parameter | Type(s) | Description |
---|---|---|
$user | object | Current editing user. |
Save form metabox
public function save_metabox_form( integer $post_id, object $post ) : mixed
Parameter | Type(s) | Description |
---|---|---|
$post_id | integer | Post ID. |
$post | object | Post Object. |
Since | v1.0.0 |
Inherited methods
This class has not inherited methods.
Properties
This class has not properties.
Inherited properties
This class has not inherited properties.
um_ext\um_stripe\admin\Profile
Class Profile
Extends | Nothing |
Implements | Nothing |
Uses | Nothing |
Constants
This class has not constants.
Methods
save_extra_user_profile_fields ( )
Save field values
public function save_extra_user_profile_fields( integer $user_id ) : void
Parameter | Type(s) | Description |
---|---|---|
$user_id | integer | the current user's ID. |
Since | v1.0.0 |
Inherited methods
This class has not inherited methods.
Properties
This class has not properties.
Inherited properties
This class has not inherited properties.
um_ext\um_stripe\admin\Settings
Class Settings
Extends | Nothing |
Implements | Nothing |
Uses | Nothing |
Constants
This class has not constants.
Methods
Add Localize Scripts
public function add_localize_data( array $data ) : array
Parameter | Type(s) | Description |
---|---|---|
$data | array | Initial Localize data. |
Since | v1.0.0 |
Returns:
$data Updated Localize data.
Apply sanitazations for all stripe settings
public function add_settings_sanitize( array $settings_map ) : array
Parameter | Type(s) | Description |
---|---|---|
$settings_map | array | Map settings. |
Since | v1.0.0 |
custom_info_text_sanitizer ( )
Sanitize info text
public function custom_info_text_sanitizer( mixed $content ) : mixed
Parameter | Type(s) | Description |
---|---|---|
$content | mixed | raw content. |
Since | v1.0.0 |
Returns:
$content Sanitized content.
Extend settings
public function extend_settings( array $settings ) : array
Parameter | Type(s) | Description |
---|---|---|
$settings | array | core and extension settings. |
Since | v1.0.0 |
Check if Stripe API is connected
public function is_stripe_connected( ) : boolean
Since | v1.0.0 |
Returns:
transient value.
Inherited methods
This class has not inherited methods.
Properties
This class has not properties.
Inherited properties
This class has not inherited properties.
um_ext\um_stripe\admin\Site_Health
Class Site_Health
Extends | Nothing |
Implements | Nothing |
Uses | Nothing |
Constants
This class has not constants.
Methods
Add our data to Site Health information.
public function debug_information( array $info ) : array
Parameter | Type(s) | Description |
---|---|---|
$info | array | The Site Health information. |
Since | v1.0 |
Returns:
The updated Site Health information.
Get Stripe Plans
private function get_stripe_plans( ) : array
Since | v1.0.0 |
Returns:
$stripe_plans Stripe Plans.
um_debug_information_pages ( )
Extend predefined pages.
public function um_debug_information_pages( array $pages ) : array
Parameter | Type(s) | Description |
---|---|---|
$pages | array | predefined pages. |
Since | v1.0 |
Inherited methods
This class has not inherited methods.
Properties
This class has not properties.
Inherited properties
This class has not inherited properties.
um_ext\um_stripe\admin\Subscriptions_Table
Create a new table class that will extend the WP_List_Table
Extends | \ |
Implements | Nothing |
Uses | Nothing |
Constants
This class has not constants.
Methods
Define what data to show on each column of the table
public function column_default( Array $item, String $column_name ) : Mixed
Parameter | Type(s) | Description |
---|---|---|
$item | Array | Data. |
$column_name | String | - Current column name. |
Show Filters
public function extra_tablenav( string $which ) : void
Parameter | Type(s) | Description |
---|---|---|
$which | string | position. |
Override the parent columns method. Defines the columns to use in your listing table
public function get_columns( ) : void
get_hidden_columns ( )
Define which columns are hidden
public function get_hidden_columns( ) : Array
Allows you to sort the data by the variables set in the $_REQUEST
private function sort_data( string $a, string $b ) : Mixed
Parameter | Type(s) | Description |
---|---|---|
$a | string | Search query. |
$b | string | Search query. |
Inherited methods
This class has not inherited methods.
Properties
This class has not properties.
Inherited properties
This class has not inherited properties.
um_ext\um_stripe\admin\User_Columns
Class User_Columns
Extends | Nothing |
Implements | Nothing |
Uses | Nothing |
Constants
This class has not constants.
Methods
show_user_subscriptions_column ( )
Add new columns
public function show_user_subscriptions_column( array $columns ) : array
Parameter | Type(s) | Description |
---|---|---|
$columns | array | User columns. |
Since | v1.0.0 |
Returns:
$column
show_user_subscriptions_row ( )
Add new columns
public function show_user_subscriptions_row( string $val, string $column_name, integer $user_id ) : string
Parameter | Type(s) | Description |
---|---|---|
$val | string | default value. |
$column_name | string | Column name. |
$user_id | integer | User ID. |
Since | v1.0.0 |
Returns:
$val
Inherited methods
This class has not inherited methods.
Properties
Inherited properties
This class has not inherited properties.
um_ext\um_stripe\ajax\Checkout
Class Checkout
Extends | Nothing |
Implements | Nothing |
Uses | Nothing |
Constants
This class has not constants.
Methods
Create checkout session
public function create_checkout_session( ) : void
Since | v1.0.0 |
Create checkout session
public function get_payment_intent( ) : void
Since | v1.0.2 |
Inherited methods
This class has not inherited methods.
Properties
This class has not properties.
Inherited properties
This class has not inherited properties.
um_ext\um_stripe\ajax\Customer
Class Customer
Extends | Nothing |
Implements | Nothing |
Uses | Nothing |
Constants
This class has not constants.
Methods
Verify Ajax Nonce and User capability.
private function verify_nonce( ) : void
Since | v1.0.0 |
Inherited methods
This class has not inherited methods.
Properties
This class has not properties.
Inherited properties
This class has not inherited properties.
um_ext\um_stripe\ajax\Init
Class Init
Extends | Nothing |
Implements | Nothing |
Uses | Nothing |
Constants
This class has not constants.
Methods
Checkout Ajax class
public function checkout( ) : \um_ext\um_stripe\ajax\Checkout()
Since | v1.0.0 |
Customer Ajax class
public function customer( ) : \um_ext\um_stripe\ajax\Customer()
Since | v1.0.0 |
Metabox Ajax class
public function metabox( ) : \um_ext\um_stripe\ajax\Metabox()
Since | v1.0.0 |
Settings Ajax class
public function settings( ) : \um_ext\um_stripe\ajax\Metabox()
Since | v1.0.0 |
Inherited methods
This class has not inherited methods.
Properties
This class has not properties.
Inherited properties
This class has not inherited properties.
um_ext\um_stripe\ajax\Metabox
Class Metabox
Extends | Nothing |
Implements | Nothing |
Uses | Nothing |
Constants
This class has not constants.
Methods
Stripe Plans field
public function add_stripe_plans_field( string $edit_mode_value, integer $form_id, array $edit_array ) : void
Parameter | Type(s) | Description |
---|---|---|
$edit_mode_value | string | Edit Mode. |
$form_id | integer | Form ID. |
$edit_array | array | Editting Field Data. |
Since | v1.0.0 |
add_stripe_plans_type_field ( )
Stripe Plans Type
public function add_stripe_plans_type_field( string $edit_mode_value ) : void
Parameter | Type(s) | Description |
---|---|---|
$edit_mode_value | string | Edit Mode. |
Since | v1.0.0 |
Inherited methods
This class has not inherited methods.
Properties
This class has not properties.
Inherited properties
This class has not inherited properties.
um_ext\um_stripe\ajax\Settings
Class Settings
Extends | Nothing |
Implements | Nothing |
Uses | Nothing |
Constants
This class has not constants.
Methods
Create a Webhook
public function create_webhook( boolean $testmode = true ) : mixed
Parameter | Type(s) | Description |
---|---|---|
$testmode optional | boolean | Whether to create a webhook for Test mode or Live mode. |
Since | v1.0.0 |
Returns:
returns the webhook secret on success, otherwise return fals.
Get Stripe Products
public function get_stripe_prices( string $secret_key, string $start_after = null, string $type = 'recurring' ) : array
Parameter | Type(s) | Description |
---|---|---|
$secret_key | string | Stripe Account's secret key. |
$start_after optional | string | Last Stripe Price ID in the result. |
$type optional | string | Stripe Product Type. |
Since | v1.0.0 |
Returns:
$plans Stripe Products.
Import products
public function import_products( ) : \um_ext\um_stripe\ajax\json
Since | v1.0.0 |
Returns:
$data products data.
Import Stripe Products
public function import_stripe_products( string $start_after = '' ) : void
Parameter | Type(s) | Description |
---|---|---|
$start_after optional | string | Last Stripe Product ID. |
Check if Webhook exists
public function is_webhook_exists( ) : boolean
Since | v1.0.0 |
Returns:
True if exists, otherwise false.
Test Stripe connection
public function test_api_connection( ) : array
Since | v1.0.0 |
Returns:
$data Stripe products.
Test Stripe Disconnection
public function test_api_disconnection( ) : array
Since | v1.0.0 |
Returns:
$data Stripe products.
Verify Ajax Nonce and User capability.
private function verify_nonce( ) : void
Since | v1.0.0 |
Inherited methods
This class has not inherited methods.
Properties
This class has not properties.
Inherited properties
This class has not inherited properties.
um_ext\um_stripe\common\CPT
Class CPT
Extends | Nothing |
Implements | Nothing |
Uses | Nothing |
Constants
POST_TYPE
Post Type
POST_TYPE = 'umm_stripe';
Type: mixed
Since | v1.0.0 |
Methods
Initialize the class and set its properties.
public function __construct( ) : void
Since | v1.0.0 |
Add Stripe custom post type
public function add_um_cpt( array $cpt ) : array
Parameter | Type(s) | Description |
---|---|---|
$cpt | array | custom post types. |
Since | v1.0.0 |
Bulk Updated Messages
public function bulk_updated_messages( array $bulk_messages ) : void
Parameter | Type(s) | Description |
---|---|---|
$bulk_messages | array | Messages. |
Since | v1.1.0 |
Create a Subscription Plan
public function create_subscription_plan( integer $price_id, string $label, string $mode = 'recurring', boolean $livemode = false, array $data = array() ) : array
Parameter | Type(s) | Description |
---|---|---|
$price_id | integer | The Stripe Price ID. |
$label | string | Plan Label/Title. |
$mode optional | string | The Stripe price mode. |
$livemode optional | boolean | Determines the Plan's livemode. |
$data optional | array | Stripe Price raw data. |
Since | v1.0.0 |
Returns:
$data returns array for status.
Apply custom column rows
public function custom_row( string $column, integer $post_id ) : void
Parameter | Type(s) | Description |
---|---|---|
$column | string | Column slug. |
$post_id | integer | Current post ID. |
Since | v1.0.0 |
Get Subscription Modes
public function get_subscription_modes( ) : array
Since | v1.0.0 |
Returns:
Subscription Modes.
Checks the Stripe Plan existence.
public function is_plan_exists( integer $price_id ) : mixed
Parameter | Type(s) | Description |
---|---|---|
$price_id | integer | The Stripe Price ID. |
Since | v1.0.0 |
Returns:
Post ID or boolean false.
Modify Post Action messages
public function post_updated_messages( array $messages ) : void
Parameter | Type(s) | Description |
---|---|---|
$messages | array | Post Messages. |
Since | v1.1.0 |
Remove quick edit from Custom Post Type table
public function remove_quick_edit( array $cpts ) : array
Parameter | Type(s) | Description |
---|---|---|
$cpts | array | Custom Post Types to filter. |
Since | v1.0.3 |
Save Plan
public function save_post( integer $post_id ) : void
Parameter | Type(s) | Description |
---|---|---|
$post_id | integer | The Post ID. |
Since | v1.1.0 |
Set Post Type Table Columns
public function set_custom_columns( array $columns ) : \um_ext\um_stripe\common\$columns
Parameter | Type(s) | Description |
---|---|---|
$columns | array | default columns data. |
Since | v1.0.0 |
Returns:
modified columns data.
Inherited methods
This class has not inherited methods.
Properties
$arr_subscription_modes static
Subscription Modes
public static $arr_subscription_modes = array();
Types:
array
Since | v1.0.0 |
Recurring Meta Keys
public $recurring_meta_keys = array('_um_subscription_status_active', '_um_subscription_status_unpaid', '_um_subscription_status_pause', '_um_subscription_status_past_due', '_um_subscription_status_canceled', '_um_subscription_status_trialing', '_um_subscription_trial_period_days');
Types:
array
Since | v1.0.0 |
One-time Meta Keys
public $onetime_meta_keys = array('_um_subscription_assign_role', '_um_subscription_assign_role_refunded');
Types:
array
Since | v1.0.0 |
Inherited properties
This class has not inherited properties.
um_ext\um_stripe\common\Fields
Class Fields
Extends | Nothing |
Implements | Nothing |
Uses | Nothing |
Constants
This class has not constants.
Methods
Add custom Stripe Email validation.
public function add_field_validation( array $validations ) : array
Parameter | Type(s) | Description |
---|---|---|
$validations | array | List of declated field validations. |
Since | v1.0.0 |
Returns:
$validations
Add field attributes
public function add_stripe_core_fields( array $fields ) : void
Parameter | Type(s) | Description |
---|---|---|
$fields | array | The array of core fields. |
add_stripe_predefined_field ( )
Add predefined fields.
public function add_stripe_predefined_field( array $fields ) : array
Parameter | Type(s) | Description |
---|---|---|
$fields | array | The array of core fields. |
Render Multi Select Field
public function custom_multi_select( string $html, array $field_data, array $form_data, \um_ext\um_stripe\common\class $class_obj ) : void
Parameter | Type(s) | Description |
---|---|---|
$html | string | HTML Content. |
$field_data | array | Field Data. |
$form_data | array | Form Data. |
$class_obj | \um_ext\um_stripe\common\class | Parent Class. |
Since | v1.2.3 |
Validate Stripe Email address
public function validate_email_unique( array $field_data, string $key, array $submitted_data ) : void
Parameter | Type(s) | Description |
---|---|---|
$field_data | array | Validation settings. |
$key | string | Field Key. |
$submitted_data | array | Submitted Form Data. |
Since | v1.0.0 |
Inherited methods
This class has not inherited methods.
Properties
This class has not properties.
Inherited properties
This class has not inherited properties.
um_ext\um_stripe\common\Init
Class Init
Extends | um_ext\um_stripe\common\Stripe |
Implements | Nothing |
Uses | Nothing |
Constants
This class has not constants.
Methods
Registration class
public function registration( ) : \um_ext\um_stripe\common\Registration()
Since | v1.0.0 |
Request Handler class
public function request_handler( ) : \um_ext\um_stripe\common\Request_Handler()
Since | v1.0.0 |
Subscription class
public function subscription( ) : \um_ext\um_stripe\common\Subscription()
Since | v1.0.0 |
Inherited methods
Properties
This class has not properties.
Inherited properties
um_ext\um_stripe\common\Logs
Class Logs
Extends | Nothing |
Implements | Nothing |
Uses | Nothing |
Constants
ENVIRONMENT
ENVIRONMENT = 'development';
Type: mixed
Methods
Log a User activity
public function user( string $action, integer $user_id = null, string $username = '', string $current_page = '', string $description = '', string $action_objects = array() ) : void
Parameter | Type(s) | Description |
---|---|---|
$action | string | User Action. |
$user_id optional | integer | User ID. |
$username optional | string | Username. |
$current_page optional | string | Current page. |
$description optional | string | Log name. |
$action_objects optional | string | Useful for storing data about the activity. |
Log a Webhook activity
public function webhook( string $action, integer $user_id = null, string $username = '', string $current_page = '', string $description = '', string $action_objects = array() ) : void
Parameter | Type(s) | Description |
---|---|---|
$action | string | Webhook Action. |
$user_id optional | integer | User ID. |
$username optional | string | Username. |
$current_page optional | string | Current page. |
$description optional | string | Log name. |
$action_objects optional | string | Useful for storing data about the activity. |
Inherited methods
This class has not inherited methods.
Properties
This class has not properties.
Inherited properties
This class has not inherited properties.
um_ext\um_stripe\common\Pages
Class Pages
Extends | Nothing |
Implements | Nothing |
Uses | Nothing |
Constants
This class has not constants.
Methods
Initialize the class and set its properties.
public function __construct( ) : void
Since | v1.0.0 |
Create default pages.
public function add_predefined_pages( array $pages ) : array
Parameter | Type(s) | Description |
---|---|---|
$pages | array | page settings. |
Since | v1.0.0 |
Flush Rewrite rule when the Checkout page has been updated e.g. slug changed.
public function flush_rewrite_rule( integer $post_id, object $post, boolean $update ) : void
Parameter | Type(s) | Description |
---|---|---|
$post_id | integer | Post ID. |
$post | object | Post Object. |
$update | boolean | Whethere the post is updated or published. |
Since | v1.0.0 |
Predefined pages content.
public function predefined_pages_content( string $content, string $slug ) : string
Parameter | Type(s) | Description |
---|---|---|
$content | string | Predefined page content. |
$slug | string | Predefined page slug (key). |
Since | v1.0.0 |
Returns:
Predefined page content.
Inherited methods
This class has not inherited methods.
Properties
This class has not properties.
Inherited properties
This class has not inherited properties.
um_ext\um_stripe\common\Registration
Class Registration
Extends | Nothing |
Implements | Nothing |
Uses | Nothing |
Constants
This class has not constants.
Methods
Initialize the class and set its properties.
public function __construct( ) : void
Since | v1.0.0 |
Checkout
public function checkout_on_registration( array $submitted_data, array $form_data ) : void
Parameter | Type(s) | Description |
---|---|---|
$submitted_data | array | Submitted Data. |
$form_data | array | Register Form settings. |
Description:
Sends the submitted to Stripe checkout session.
Since | v1.0.0 |
redirect_after_successful_checkout ( )
Redirect after successful checkout.
public function redirect_after_successful_checkout( ) : void
Stripe Checkout
public function set_stripe_customer( integer $user_id, array $args ) : void
Parameter | Type(s) | Description |
---|---|---|
$user_id | integer | The customer ID. |
$args | array | Form array arguments. |
Since | v1.0.0 |
Validate billing email address
public function validate_billing_email( array $args ) : void
Parameter | Type(s) | Description |
---|---|---|
$args | array | Form submitted fields. |
Since | v1.0.0 |
Process Registration
public function webhook_register( object $checkout_session, string $payment_mode ) : void
Parameter | Type(s) | Description |
---|---|---|
$checkout_session | object | Checkout Session Object. |
$payment_mode | string | Payment Mode. |
Inherited methods
This class has not inherited methods.
Properties
This class has not properties.
Inherited properties
This class has not inherited properties.
um_ext\um_stripe\common\Request_Handler
Class Request_Handler
Extends | Nothing |
Implements | Nothing |
Uses | Nothing |
Constants
This class has not constants.
Methods
Cancel a Subscription
public function cancel_user_subscription( integer $plan_id ) : void
Parameter | Type(s) | Description |
---|---|---|
$plan_id | integer | UM Stripe Plan ID. |
Since | v1.0.0 |
Subscription via Direct URL Redirect User to Stripe checkout with selected Stripe Price ID.
public function checkout( ) : void
Since | v1.0.0 |
Create Customer portal session
public function customer_portal_session( boolean $direct = false ) : void
Parameter | Type(s) | Description |
---|---|---|
$direct optional | boolean | Whether to redirect user without the extra parameters. |
Since | v1.0.0 |
Deletes all user roles
public function flush_roles( integer $user_id ) : void
Parameter | Type(s) | Description |
---|---|---|
$user_id | integer | User ID. |
Since | v1.0.0 |
Add Stripe hosts for safe redirection.
public function stripe_redirect_hosts( array $hosts ) : array
Parameter | Type(s) | Description |
---|---|---|
$hosts | array | WP allowed hosts. |
Since | v1.0.0 |
Returns:
modified allowed hosts.
Switch old role with the a new role
public function swap_role( integer $user_id, string $new_role ) : void
Parameter | Type(s) | Description |
---|---|---|
$user_id | integer | User ID. |
$new_role | string | Current User Role. |
Assign Role on Active subscription
public function umm_stripe_status_active( integer $user_id, integer $role ) : void
Parameter | Type(s) | Description |
---|---|---|
$user_id | integer | The customer ID. |
$role | integer | The assigning role. |
Since | v1.0.0 |
umm_stripe_status_canceled ( )
Assign Role on Canceled subscription
public function umm_stripe_status_canceled( integer $user_id, integer $role ) : void
Parameter | Type(s) | Description |
---|---|---|
$user_id | integer | The customer ID. |
$role | integer | The assigning role. |
Since | v1.0.0 |
umm_stripe_status_incomplete ( )
Assign Role on Incomplete subscription
public function umm_stripe_status_incomplete( integer $user_id, integer $role ) : void
Parameter | Type(s) | Description |
---|---|---|
$user_id | integer | The customer ID. |
$role | integer | The assigning role. |
Since | v1.0.0 |
umm_stripe_status_incomplete_expired ( )
Assign Role on Incomplete-Expired subscription
public function umm_stripe_status_incomplete_expired( integer $user_id, integer $role ) : void
Parameter | Type(s) | Description |
---|---|---|
$user_id | integer | The customer ID. |
$role | integer | The assigning role. |
Since | v1.0.0 |
umm_stripe_status_onetime_refunded ( )
Set role on one-time refund
public function umm_stripe_status_onetime_refunded( integer $user_id, integer $role ) : void
Parameter | Type(s) | Description |
---|---|---|
$user_id | integer | The customer ID. |
$role | integer | The assigning role. |
Since | v1.0.0 |
umm_stripe_status_past_due ( )
Assign Role on Past Due subscription
public function umm_stripe_status_past_due( integer $user_id, integer $role ) : void
Parameter | Type(s) | Description |
---|---|---|
$user_id | integer | The customer ID. |
$role | integer | The assigning role. |
Since | v1.0.0 |
Assign Role on Pause subscription
public function umm_stripe_status_pause( integer $user_id, integer $role ) : void
Parameter | Type(s) | Description |
---|---|---|
$user_id | integer | The customer ID. |
$role | integer | The assigning role. |
Since | v1.0.0 |
umm_stripe_status_trialing ( )
Assign Role on Trialing subscription
public function umm_stripe_status_trialing( integer $user_id, integer $role ) : void
Parameter | Type(s) | Description |
---|---|---|
$user_id | integer | The customer ID. |
$role | integer | The assigning role. |
Since | v1.0.0 |
Assign Role on Unpaid subscription
public function umm_stripe_status_unpaid( integer $user_id, integer $role ) : void
Parameter | Type(s) | Description |
---|---|---|
$user_id | integer | The customer ID. |
$role | integer | The assigning role. |
Since | v1.0.0 |
umm_stripe_user_status_delete ( )
Delete Subscription Status.
public function umm_stripe_user_status_delete( integer $user_id ) : void
Parameter | Type(s) | Description |
---|---|---|
$user_id | integer | The customer ID. |
Since | v1.0.0 |
Inherited methods
This class has not inherited methods.
Properties
Inherited properties
This class has not inherited properties.
um_ext\um_stripe\common\Stripe
Class Stripe
Extends | Nothing |
Implements | Nothing |
Uses | Nothing |
Since | v1.0.0 |
Constants
This class has not constants.
Methods
Assign Stripe account to a another WP account
public function assign_stripe_account( integer $old_user_id, integer $new_user_id, string $stripe_customer_id ) : boolean
Parameter | Type(s) | Description |
---|---|---|
$old_user_id | integer | Previous WP account's user ID. |
$new_user_id | integer | New WP account's user ID. |
$stripe_customer_id | string | Stripe customer ID. |
Since | v1.0.0 |
Base64 encoding.
public function base64_encode_url( string $url ) : string
Parameter | Type(s) | Description |
---|---|---|
$url | string | String to process. |
Returns:
encoded string.
Cache Stripe Prices
public function cache_price( string $id, string $label, array $data, string $type, string $livemode, string $price_label, object $obj_product ) : void
Parameter | Type(s) | Description |
---|---|---|
$id | string | The Stripe Price ID. |
$label | string | The Stripe Product Name. |
$data | array | The raw Stripe Price data. |
$type | string | The Stripe Price type. |
$livemode | string | The Stripe Price mode. |
$price_label | string | Formatted Price Label. |
$obj_product | object | Stripe Product. |
Since | v1.0.0 |
Get all products from cache
public function get_all_products( ) : void
Since | v1.0.0 |
Get Price ID from Custom Post Type
public function get_cpt_price_id( integer $post_id ) : void
Parameter | Type(s) | Description |
---|---|---|
$post_id | integer | CPT post ID. |
Since | v1.0.0 |
Get Price Mode from Custom Post Type
public function get_cpt_price_mode( integer $post_id ) : void
Parameter | Type(s) | Description |
---|---|---|
$post_id | integer | CPT post ID. |
Since | v1.0.0 |
Get Order Details with Checkout Session
public function get_order_details( string $checkout_session, boolean $once = false, boolean $session_only = false ) : void
Parameter | Type(s) | Description |
---|---|---|
$checkout_session | string | Checkout Session ID. |
$once optional | boolean | Cache checkout session data once. |
$session_only optional | boolean | Whether returning the session object only. |
Since | v1.0.0 |
Get Stripe Price
public function get_price( string $price_id, boolean $with_product = false ) : void
Parameter | Type(s) | Description |
---|---|---|
$price_id | string | Stripe Price ID. |
$with_product optional | boolean | Include Product data. |
Get product from cache
public function get_product( string $product_id ) : void
Parameter | Type(s) | Description |
---|---|---|
$product_id | string | Stripe Product ID. |
Since | v1.0.0 |
Get status title
public function get_status_title( string $status_slug ) : string
Parameter | Type(s) | Description |
---|---|---|
$status_slug | string | Stripe status key. |
Since | v1.0.0 |
Get Tax Meta
public function get_tax_meta( string $code ) : void
Parameter | Type(s) | Description |
---|---|---|
$code | string | Tax Code. |
Since | v1.0.0 |
Check if a billing email already in use on Stripe.com
public function is_billing_email_exists( string $email ) : boolean
Parameter | Type(s) | Description |
---|---|---|
$email | string | Email address. |
Since | v1.0.0 |
Stripe PHP core library
public function stripe_api( string $secret_key = '' ) : void
Parameter | Type(s) | Description |
---|---|---|
$secret_key optional | string | Stripe API secret key. |
Since | v1.0.0 |
update_cache_price_product ( )
Cache Price's Product.
public function update_cache_price_product( string $price_id, object $obj_product ) : void
Parameter | Type(s) | Description |
---|---|---|
$price_id | string | Stripe Price ID. |
$obj_product | object | Stripe Product. |
Since | v1.0.0 |
Update a product cache.
public function update_product_cache( string $product_id, object $obj_product ) : void
Parameter | Type(s) | Description |
---|---|---|
$product_id | string | Stripe Product ID. |
$obj_product | object | Stripe Product. |
Since | v1.0.0 |
Inherited methods
This class has not inherited methods.
Properties
Stripe Statuses
public $stripe_payment_method_types = array('acss_debit', 'affirm', 'afterpay_clearpay', 'alipay', 'au_becs_debit', 'bacs_debit', 'bancontact', 'blik', 'boleto', 'card', 'cashapp', 'customer_balance', 'eps', 'fpx', 'giropay', 'grabpay', 'ideal', 'klarna', 'konbini', 'link', 'oxxo', 'p24', 'paynow', 'paypal', 'pix', 'promptpay', 'sepa_debit', 'sofort', 'us_bank_account', 'wechat_pay', 'zip');
Types:
array
Since | v1.0.0 |
Inherited properties
This class has not inherited properties.
um_ext\um_stripe\common\Subscription
Class Subscription
Extends | Nothing |
Implements | Nothing |
Uses | Nothing |
Constants
This class has not constants.
Methods
Retrieve Active Subscriptions
public function get_active_subscriptions( integer $user_id = null, boolean $purge = false ) : void
Parameter | Type(s) | Description |
---|---|---|
$user_id optional | integer | the user ID. |
$purge optional | boolean | Whether purge the cache to retrieve and update the cache. |
Since | v1.1.0 |
get_amount_decimal_formatted ( )
Format into 2 decimal place.
public function get_amount_decimal_formatted( float $number = 0, string $currency = '', boolean $symbol = false ) : float
Parameter | Type(s) | Description |
---|---|---|
$number optional | float | Number. |
$currency optional | string | Currency Code. |
$symbol optional | boolean | Whethere include the currency symbol in the format. |
Returns:
formatted number.
Gets one-time subscription's role
public function get_onetime_role( integer $customer_id = null, string $status = '', integer $user_id = null ) : string
Parameter | Type(s) | Description |
---|---|---|
$customer_id optional | integer | The stripe customer ID. |
$status optional | string | The stripe event status. |
$user_id optional | integer | User ID. |
Since | v1.0.0 |
Returns:
$role The role slug.
Gets subscription's role
public function get_role( integer $customer_id = null, string $status = '', integer $user_id = null ) : string
Parameter | Type(s) | Description |
---|---|---|
$customer_id optional | integer | The stripe customer ID. |
$status optional | string | The stripe event status. |
$user_id optional | integer | User ID. |
Since | v1.0.0 |
Returns:
$role The role slug.
get_user_id_by_checkout_session_id ( )
Get WP User ID by Stripe Checkout Session ID
public function get_user_id_by_checkout_session_id( string $session_id ) : integer
Parameter | Type(s) | Description |
---|---|---|
$session_id | string | Stripe Checkout Session ID. |
Since | v1.0.0 |
Returns:
$user_id WP User ID.
get_user_id_by_customer_id ( )
Get WP User ID by Stripe customer id
public function get_user_id_by_customer_id( string $customer_id, integer $payment_intent_id = null ) : integer
Parameter | Type(s) | Description |
---|---|---|
$customer_id | string | Stripe customer ID. |
$payment_intent_id optional | integer | Payment Intent ID. |
Since | v1.0.0 |
Returns:
$user_id WP User ID.
Update Subscription cache
public function umm_stripe_status_changed( string $status, integer $user_id, string $role ) : void
Parameter | Type(s) | Description |
---|---|---|
$status | string | Subscription status. |
$user_id | integer | User ID. |
$role | string | The user role. |
Since | v1.0.2 |
umm_stripe_user_plan_changed ( )
Triggers when the status has changed via Plan Switch
public function umm_stripe_user_plan_changed( string $status, integer $um_user_id, string $role_active, integer $has_switched_plan_id, integer $previous_plan_id, mixed $billing_portal_configs ) : void
Parameter | Type(s) | Description |
---|---|---|
$status | string | Status name. |
$um_user_id | integer | the user ID. |
$role_active | string | the user Role. |
$has_switched_plan_id | integer | the new plan ID. |
$previous_plan_id | integer | the previous plan ID. |
$billing_portal_configs | mixed | Billing Configurations from Stripe API. |
Since | v1.2.3 |
Inherited methods
This class has not inherited methods.
Properties
This class has not properties.
Inherited properties
This class has not inherited properties.
um_ext\um_stripe\common\User
Class User
Extends | Nothing |
Implements | Nothing |
Uses | Nothing |
Constants
This class has not constants.
Methods
Creates a Stripe Customer
public function create_stripe_customer( integer|null $user_id = null, null|string $billing_email = null ) : mixed
Parameter | Type(s) | Description |
---|---|---|
$user_id optional | integer null | User ID. |
$billing_email optional | null string | Optiona billing email. |
Since | v1.0.0 |
Returns:
$customer_id customer's ID or null.
Delete Stripe customer on UM Account deletion
public function delete_user( integer $user_id ) : void
Parameter | Type(s) | Description |
---|---|---|
$user_id | integer | User ID. |
Since | v1.0.0 |
Get a user's subscription data
public function get_subscription_data( integer $user_id = null ) : void
Parameter | Type(s) | Description |
---|---|---|
$user_id optional | integer | User ID. |
Since | v1.0.2 |
Gets user's subscription ID
public function get_subscription_id( integer $user_id = null ) : void
Parameter | Type(s) | Description |
---|---|---|
$user_id optional | integer | User ID. |
Since | v1.0.0 |
Checks if a user has an active subscription.
public function has_active_subscription( integer $user_id = null, boolean $return_status = false ) : mixed
Parameter | Type(s) | Description |
---|---|---|
$user_id optional | integer | The User ID. |
$return_status optional | boolean | Return the status name. |
Since | v1.0.0 |
Returns:
$status The status name.
Checks if a user is already subscribed
public function is_subscribed( integer $user_id = null, boolean $return_status = false ) : mixed
Parameter | Type(s) | Description |
---|---|---|
$user_id optional | integer | The User ID. |
$return_status optional | boolean | Return the status name. |
Since | v1.0.0 |
Returns:
$status The status name.
show_plan_title_for_admin_review_registration ( )
Add Stripe Plan Title to the Submitted Data form
public function show_plan_title_for_admin_review_registration( string $v, string $k ) : void
Parameter | Type(s) | Description |
---|---|---|
$v | string | Value. |
$k | string | Meta Key. |
Since | v1.1.0 |
Inherited methods
This class has not inherited methods.
Properties
Has Active Subscription
private $has_active_subscription;
Types:
mixed
Since | v1.1.0 |
Inherited properties
This class has not inherited properties.
um_ext\um_stripe\db\Init
Class Init
Extends | Nothing |
Implements | Nothing |
Uses | Nothing |
Since | v1.0.2 |
Constants
This class has not constants.
Methods
Inherited methods
This class has not inherited methods.
Properties
This class has not properties.
Inherited properties
This class has not inherited properties.
um_ext\um_stripe\frontend\Account
Class Account
Extends | Nothing |
Implements | Nothing |
Uses | Nothing |
Constants
This class has not constants.
Methods
Register Billing Tab
public function account_tab( array $tabs ) : void
Parameter | Type(s) | Description |
---|---|---|
$tabs | array | Tabs. |
Since | v1.0.8 |
Add content to account tab
public function billing_tab_content( string $output ) : string
Parameter | Type(s) | Description |
---|---|---|
$output | string | HTML output. |
save_payment_collection_method ( )
SavePayment Method Collection
public function save_payment_collection_method( ) : string
Since | v1.3.7 |
Inherited methods
This class has not inherited methods.
Properties
This class has not properties.
Inherited properties
This class has not inherited properties.
um_ext\um_stripe\frontend\Content_Restriction
Class Enqueue
Extends | Nothing |
Implements | Nothing |
Uses | Nothing |
Constants
This class has not constants.
Methods
Apply Post/Page restrictions based on Stripe Plans
public function apply_post_restrictions( boolean $restricted, integer $object_id ) : void
Parameter | Type(s) | Description |
---|---|---|
$restricted | boolean | Is restricted?. |
$object_id | integer | Post ID. |
Since | v1.0.0 |
apply_taxonomy_restrictions ( )
Apply Taxonomy restrictions based on Stripe Plans
public function apply_taxonomy_restrictions( boolean $restricted, integer $object_id ) : void
Parameter | Type(s) | Description |
---|---|---|
$restricted | boolean | Is restricted?. |
$object_id | integer | Taxonomy/Tag ID. |
Since | v1.0.0 |
Cache Price & Plans IDs
public function cache_price_hash_id( ) : void
Since | v1.0.2 |
get_post_restriction_settings ( )
Get Post/Page Restriction settings
public function get_post_restriction_settings( integer $object_id ) : void
Parameter | Type(s) | Description |
---|---|---|
$object_id | integer | Post ID. |
Since | v1.0.0 |
get_taxonomy_restriction_settings ( )
Get Taxonomy Restriction settings
public function get_taxonomy_restriction_settings( integer $object_id ) : void
Parameter | Type(s) | Description |
---|---|---|
$object_id | integer | Taxonomy/Tag ID. |
Since | v1.0.0 |
Inherited methods
This class has not inherited methods.
Properties
Inherited properties
This class has not inherited properties.
um_ext\um_stripe\frontend\Enqueue
Class Enqueue
Extends | Nothing |
Implements | Nothing |
Uses | Nothing |
Constants
This class has not constants.
Methods
Enqueue front-end scripts
public function wp_enqueue_scripts( ) : void
Since | v1.0.0 |
Inherited methods
This class has not inherited methods.
Properties
This class has not properties.
Inherited properties
This class has not inherited properties.
um_ext\um_stripe\frontend\Init
Class Init
Extends | Nothing |
Implements | Nothing |
Uses | Nothing |
Constants
This class has not constants.
Methods
Class Account
public function account( ) : \um_ext\um_stripe\frontend\Account()
Since | v1.0.0 |
Class Content_Restriction
public function content_restriction( ) : \um_ext\um_stripe\frontend\Content_Restriction()
Since | v1.0.0 |
Enqueue class
public function enqueue( ) : \um_ext\um_stripe\frontend\Enqueue()
Since | v1.0.0 |
Registration class
public function registration( ) : \um_ext\um_stripe\frontend\Registration()
Since | v1.0.0 |
Shortcode class
public function shortcode( ) : \um_ext\um_stripe\frontend\Shortcode()
Since | v1.0.0 |
Inherited methods
This class has not inherited methods.
Properties
This class has not properties.
Inherited properties
This class has not inherited properties.
um_ext\um_stripe\frontend\Registration
Class Registration
Extends | Nothing |
Implements | Nothing |
Uses | Nothing |
Constants
This class has not constants.
Methods
Initialize the class and set its properties.
public function __construct( ) : void
Since | v1.0.0 |
Allow HTML tags for Stripe Plans labels
public function builder_input_map( array $args ) : array
Parameter | Type(s) | Description |
---|---|---|
$args | array | field options. |
Since | v1.0.0 |
Returns:
$args updated field options.
Include hidden field for grouped section
public function um_after_register_fields( ) : void
Since | v1.3.0 |
Register fields
public function um_stripe_field_register( string $output, array $data ) : string
Parameter | Type(s) | Description |
---|---|---|
$output | string | HTML output. |
$data | array | field settings. |
Since | v1.0.0 |
Inherited methods
This class has not inherited methods.
Properties
This class has not properties.
Inherited properties
This class has not inherited properties.
um_ext\um_stripe\frontend\Shortcode
Class Shortcode
Extends | Nothing |
Implements | Nothing |
Uses | Nothing |
Constants
This class has not constants.
Methods
Save Checkout Session ID from URL to PHP session.
public function save_checkout_session_id( ) : void
Since | v1.4.4 |
Display Message for inactive subscription.
public function show_content( array $args, mixed $content = '' ) : void
Parameter | Type(s) | Description |
---|---|---|
$args | array | Shortcode attributes. |
$content optional | mixed | Enclosed content. |
Since | v1.1.0 |
Stripe Button shortcode.
public function ultimatemember_stripe( array $atts = array() ) : string
Parameter | Type(s) | Description |
---|---|---|
$atts optional | array | shortcode attributes. |
Since | v1.0.0 |
ultimatemember_stripe_customer_portal ( )
Stripe Customer Portal
public function ultimatemember_stripe_customer_portal( array $atts = array() ) : string
Parameter | Type(s) | Description |
---|---|---|
$atts optional | array | Shortcode attributes. |
Since | v1.0.0 |
ultimatemember_stripe_order_details ( )
Displays Order Details
public function ultimatemember_stripe_order_details( array $args ) : void
Parameter | Type(s) | Description |
---|---|---|
$args | array | Shortcode attributes. |
ultimatemember_stripe_payment_checkout_form ( )
Displays Checkout form
public function ultimatemember_stripe_payment_checkout_form( array $args ) : void
Parameter | Type(s) | Description |
---|---|---|
$args | array | Shortcode attributes. |
Inherited methods
This class has not inherited methods.
Properties
Inherited properties
This class has not inherited properties.
um_ext\um_stripe\db\logs\Init
Class Init
Extends | Nothing |
Implements | Nothing |
Uses | Nothing |
Constants
This class has not constants.
Methods
Inherited methods
This class has not inherited methods.
Properties
This class has not properties.
Inherited properties
This class has not inherited properties.
um_ext\um_stripe\db\logs\Logs_Query
Class Logs_Query
Extends | \ |
Implements | Nothing |
Uses | Nothing |
Since | v1.0.0 |
Constants
This class has not constants.
Methods
This class has not methods.
Inherited methods
This class has not inherited methods.
Properties
Name of the database table to query.
protected $table_name = 'um_stripe_logs';
Types:
string
Since | v1.0.0 |
String used to alias the database table in MySQL statement.
protected $table_alias = 'ums_log';
Types:
string
Description:
Keep this short, but descriptive. I.E. "tr" for term relationships.
This is used to avoid collisions with JOINs.
Since | v1.0.0 |
Name of class used to setup the database schema.
protected $table_schema = 'um_ext\um_stripe\db\logs\Logs_Schema';
Types:
string
Since | v1.0.0 |
Name for a single item.
protected $item_name = 'um_stripe_log';
Types:
string
Description:
Use underscores between words. I.E. "term_relationship"
This is used to automatically generate action hooks.
Since | v1.0.0 |
Plural version for a group of items.
protected $item_name_plural = 'um_stripe_logs';
Types:
string
Description:
Use underscores between words. I.E. "term_relationships"
This is used to automatically generate action hooks.
Since | v1.0.0 |
Name of class used to turn IDs into first-class objects.
protected $item_shape = 'um_ext\um_stripe\db\logs\Logs_Row';
Types:
mixed
Description:
This is used when looping through return values to guarantee their shape.
Since | v1.0.0 |
Inherited properties
This class has not inherited properties.
um_ext\um_stripe\db\logs\Logs_Row
Class Logs_Row
Extends | \ |
Implements | Nothing |
Uses | Nothing |
Since | v1.0.0 |
Constants
This class has not constants.
Methods
Constructor
public function __construct( object $item ) : void
Parameter | Type(s) | Description |
---|---|---|
$item | object | Item Object. |
Since | v1.0.0 |
Inherited methods
This class has not inherited methods.
Properties
This class has not properties.
Inherited properties
This class has not inherited properties.
um_ext\um_stripe\db\logs\Logs_Schema
Class Logs_Schema
Extends | \ |
Implements | Nothing |
Uses | Nothing |
Since | v1.0.0 |
Constants
This class has not constants.
Methods
This class has not methods.
Inherited methods
This class has not inherited methods.
Properties
Columns
public $columns = array('id' => array('name' => 'id', 'type' => 'bigint', 'length' => '20', 'unsigned' => true, 'extra' => 'auto_increment', 'primary' => true, 'sortable' => true), 'action' => array('name' => 'action', 'type' => 'mediumtext', 'unsigned' => true, 'searchable' => true, 'sortable' => true), 'trigger_type' => array('name' => 'trigger_type', 'type' => 'tinytext', 'unsigned' => true, 'searchable' => true, 'sortable' => true), 'user_id' => array('name' => 'user_id', 'type' => 'mediumtext', 'unsigned' => true, 'searchable' => true, 'sortable' => true), 'username' => array('name' => 'username', 'type' => 'mediumtext', 'unsigned' => true, 'searchable' => true, 'sortable' => true), 'current_page' => array('name' => 'current_page', 'type' => 'mediumtext', 'unsigned' => true, 'searchable' => true, 'sortable' => true), 'ip_address' => array('name' => 'ip_address', 'type' => 'mediumtext', 'unsigned' => true, 'searchable' => true, 'sortable' => true), 'description' => array('name' => 'description', 'type' => 'longtext', 'unsigned' => true, 'searchable' => true, 'sortable' => true), 'metadata' => array('name' => 'metadata', 'type' => 'longtext', 'unsigned' => true, 'searchable' => true, 'sortable' => true), 'date_created' => array('name' => 'date_created', 'type' => 'timestamp', 'date_query' => true, 'unsigned' => true, 'searchable' => true, 'sortable' => true));
Types:
mixed
Inherited properties
This class has not inherited properties.
um_ext\um_stripe\db\logs\Logs_Table
Class Logs_Table
Extends | \ |
Implements | Nothing |
Uses | Nothing |
Since | v1.0.0 |
Constants
This class has not constants.
Methods
Upgrade to version 10052023
- Change table constraint
protected function __10052023( ) : boolean
Since | v1.0.0 |
Upgrade to version 11092023
- Change table constraint
protected function __11092023( ) : boolean
Since | v1.0.2 |
Upgrade to version 12162023
- Fix Containts
protected function __12162023( ) : void
Since | v1.0.6 |
Inherited methods
This class has not inherited methods.
Properties
Table name, without the global table prefix.
public $name = 'um_stripe_logs';
Types:
string
Since | v1.0.0 |
Database version key (saved in _options or _sitemeta)
protected $db_version_key = 'um_stripe_logs_version';
Types:
string
Since | v1.0.0 |
Key => value array of versions => methods.
protected $upgrades = array('10052023' => 10052023, '11092023' => 11092023, '12162023' => 12162023);
Types:
array
Since | v1.0.0 |
Inherited properties
This class has not inherited properties.
um_ext\um_stripe\db\subscriptions\Init
Class Init
Extends | Nothing |
Implements | Nothing |
Uses | Nothing |
Constants
This class has not constants.
Methods
Schema class
public function schema( ) : \um_ext\um_stripe\db\subscriptions\Schema()
Since | v1.0.0 |
Table class
public function table( ) : \um_ext\um_stripe\db\subscriptions\table()
Since | v1.0.0 |
Inherited methods
This class has not inherited methods.
Properties
This class has not properties.
Inherited properties
This class has not inherited properties.
um_ext\um_stripe\db\subscriptions\Subscriptions
Class Subscriptions_Query
Extends | \ |
Implements | Nothing |
Uses | Nothing |
Since | v1.0.2 |
Constants
This class has not constants.
Methods
Subscriptions constructor.
public function __construct( object $item ) : void
Parameter | Type(s) | Description |
---|---|---|
$item | object | row. |
Since | v1.0.0 |
Inherited methods
This class has not inherited methods.
Properties
This class has not properties.
Inherited properties
This class has not inherited properties.
um_ext\um_stripe\db\subscriptions\Subscriptions_Query
Class Subscriptions_Query
Extends | \ |
Implements | Nothing |
Uses | Nothing |
Since | v1.0.0 |
Constants
This class has not constants.
Methods
This class has not methods.
Inherited methods
This class has not inherited methods.
Properties
Name of the database table to query.
protected $table_name = 'um_stripe_subscriptions';
Types:
string
Since | v1.0.0 |
String used to alias the database table in MySQL statement.
protected $table_alias = 'ums_subscription';
Types:
string
Description:
Keep this short, but descriptive. I.E. "tr" for term relationships.
This is used to avoid collisions with JOINs.
Since | v1.0.0 |
Name of class used to setup the database schema.
protected $table_schema = 'um_ext\um_stripe\db\subscriptions\Subscriptions_Schema';
Types:
string
Since | v1.0.0 |
Name for a single item.
protected $item_name = 'um_stripe_subscription';
Types:
string
Description:
Use underscores between words. I.E. "term_relationship"
This is used to automatically generate action hooks.
Since | v1.0.0 |
Plural version for a group of items.
protected $item_name_plural = 'um_stripe_subscriptions';
Types:
string
Description:
Use underscores between words. I.E. "term_relationships"
This is used to automatically generate action hooks.
Since | v1.0.0 |
Name of class used to turn IDs into first-class objects.
protected $item_shape = 'um_ext\um_stripe\db\subscriptions\Subscriptions_Row';
Types:
mixed
Description:
This is used when looping through return values to guarantee their shape.
Since | v1.0.0 |
Inherited properties
This class has not inherited properties.
um_ext\um_stripe\db\subscriptions\Subscriptions_Row
Class Subscriptions_Row
Extends | \ |
Implements | Nothing |
Uses | Nothing |
Since | v1.0.0 |
Constants
This class has not constants.
Methods
Constructor
public function __construct( object $item ) : void
Parameter | Type(s) | Description |
---|---|---|
$item | object | Item Object. |
Since | v1.0.0 |
Inherited methods
This class has not inherited methods.
Properties
This class has not properties.
Inherited properties
This class has not inherited properties.
um_ext\um_stripe\db\subscriptions\Subscriptions_Schema
Class Subscriptions_Schema
Extends | \ |
Implements | Nothing |
Uses | Nothing |
Since | v1.0.0 |
Constants
This class has not constants.
Methods
This class has not methods.
Inherited methods
This class has not inherited methods.
Properties
Columns
public $columns = array('id' => array('name' => 'id', 'type' => 'bigint', 'length' => '20', 'unsigned' => true, 'extra' => 'auto_increment', 'primary' => true, 'sortable' => true), 'user_id' => array('name' => 'user_id', 'type' => 'bigint', 'length' => '20', 'unsigned' => true, 'searchable' => true, 'sortable' => true), 'type' => array('name' => 'type', 'type' => 'enum', 'unsigned' => true, 'searchable' => true, 'sortable' => true), 'plan_id' => array('name' => 'plan_id', 'type' => 'bigint', 'length' => '20', 'unsigned' => true, 'searchable' => true, 'sortable' => true), 'subscription_id' => array('name' => 'subscription_id', 'type' => 'mediumtext', 'unsigned' => true, 'searchable' => true, 'sortable' => true), 'price_id' => array('name' => 'price_id', 'type' => 'mediumtext', 'unsigned' => true, 'searchable' => true, 'sortable' => true), 'product_id' => array('name' => 'product_id', 'type' => 'mediumtext', 'unsigned' => true, 'searchable' => true, 'sortable' => true), 'hash_id' => array('name' => 'hash_id', 'type' => 'longtext', 'unsigned' => true, 'searchable' => true, 'sortable' => true), 'status' => array('name' => 'status', 'type' => 'mediumtext', 'unsigned' => true, 'searchable' => true, 'sortable' => true), 'payment_link' => array('name' => 'payment_link', 'type' => 'tinyint', 'unsigned' => true, 'searchable' => true, 'sortable' => true), 'date_created' => array('name' => 'date_created', 'type' => 'timestamp', 'date_query' => true, 'unsigned' => true, 'searchable' => true, 'sortable' => true));
Types:
mixed
Inherited properties
This class has not inherited properties.
um_ext\um_stripe\db\subscriptions\Subscriptions_Table
Class Subscriptions_Table
Extends | \ |
Implements | Nothing |
Uses | Nothing |
Since | v1.0.0 |
Constants
This class has not constants.
Methods
Upgrade to version 10202023
- Change table constraint
protected function __10202023( ) : boolean
Since | v1.0.2 |
Upgrade to version 11092023
- Change table constraint
protected function __11092023( ) : boolean
Since | v1.0.2 |
Upgrade to version 11292023
- Add new colum for payment_link mode.
protected function __11292023( ) : boolean
Since | v1.0.2 |
Upgrade to version 12162023
- Fix constaint
protected function __12162023( ) : boolean
Since | v1.0.6 |
Inherited methods
This class has not inherited methods.
Properties
Table name, without the global table prefix.
public $name = 'um_stripe_subscriptions';
Types:
string
Since | v1.0.0 |
Database version key (saved in _options or _sitemeta)
protected $db_version_key = 'um_stripe_subscriptions_version';
Types:
string
Since | v1.0.0 |
Optional description.
public $description = 'UM Stripe Subscriptions';
Types:
string
Since | v1.0.0 |
Key => value array of versions => methods.
protected $upgrades = array('10202023' => 10202023, '11092023' => 11092023, '11292023' => 11292023, '12142023' => 11092023, '12162023' => 12162023);
Types:
array
Since | v1.0.0 |
Inherited properties
This class has not inherited properties.
um_ext\um_stripe\Functions
Class Functions
Extends | Nothing |
Implements | Nothing |
Uses | Nothing |
Constants
This class has not constants.
Methods
get_billing_plan_formatted_title ( )
Get formatted Billing Plan Title
public function get_billing_plan_formatted_title( object $price_data, string $interval, integer $interval_count, boolean $bill_next_line = false, boolean $onetime = false ) : string
Parameter | Type(s) | Description |
---|---|---|
$price_data | object | Stripe Price. |
$interval | string | Stripe Price Interval. |
$interval_count | integer | Stripe Interval Count. |
$bill_next_line optional | boolean | Add breakline before "every". |
$onetime optional | boolean | Render title for one-time payment plan. |
Since | v1.0.0 |
Returns:
Formatted Billing Plan Title.
Get Billing Plan Title
public function get_billing_plan_title( float $price, string $interval, integer $interval_count, boolean $bill_next_line = false ) : string
Parameter | Type(s) | Description |
---|---|---|
$price | float | Stripe Price. |
$interval | string | Stripe Price Interval. |
$interval_count | integer | Stripe Interval Count. |
$bill_next_line optional | boolean | Add breakline before "every". |
Since | v1.0.0 |
Returns:
Formatted Billing Plan Title.
Get Stripe Plans
public function get_plans( boolean $include_id_in_labels = false, string $mode = 'all' ) : array
Parameter | Type(s) | Description |
---|---|---|
$include_id_in_labels optional | boolean | Whether to include ID in the labels. |
$mode optional | string | Filter plans by subscription/price mode. |
Since | v1.0.0 |
Returns:
Posts.
get_plans_sorted_by_prices ( )
Get Stripe Plans sorted by Prices
public function get_plans_sorted_by_prices( boolean $include_id_in_labels = false, string $mode = 'all' ) : array
Parameter | Type(s) | Description |
---|---|---|
$include_id_in_labels optional | boolean | Whether to include ID in the labels. |
$mode optional | string | Filter plans by subscription/price mode. |
Since | v1.0.0 |
Returns:
Posts.
Get Price by Post ID
public function get_price_by_post_id( integer $post_id ) : string
Parameter | Type(s) | Description |
---|---|---|
$post_id | integer | Post ID. |
Since | v1.0.0 |
Returns:
Formatted Price.
Get Price Data from Cache
public function get_price_data_by_post_id( integer $post_id ) : mixed
Parameter | Type(s) | Description |
---|---|---|
$post_id | integer | The Post ID. |
Since | v1.0.0 |
Returns:
Price data array, false when nothing found in the cache.
get_price_data_by_price_id ( )
Get Price Data from Cache by Price ID
public function get_price_data_by_price_id( integer $price_id ) : mixed
Parameter | Type(s) | Description |
---|---|---|
$price_id | integer | The Stripe Price ID. |
Since | v1.0.8 |
Returns:
Price data array, false when nothing found in the cache.
Get Price Mode by Post ID
public function get_price_mode_by_post_id( integer $post_id ) : string
Parameter | Type(s) | Description |
---|---|---|
$post_id | integer | The Post ID. |
Since | v1.0.0 |
Returns:
$mode Mode in HTML format.
get_subscription_mode_title ( )
Get Subscription Mode label
public function get_subscription_mode_title( string $mode_slug ) : string
Parameter | Type(s) | Description |
---|---|---|
$mode_slug | string | Subscription Mode slug. |
Since | v1.0.0 |
Returns:
Subscription Label
Gets the webhook URL for Stripe triggers. Used mainly for asyncronous redirect payment methods in which statuses are not immediately chargeable.
public static function get_webhook_url( ) : string
Since | v1.0.0 |
Inherited methods
This class has not inherited methods.
Properties
Inherited properties
This class has not inherited properties.
um_ext\um_stripe\Install
Class Install
Extends | Nothing |
Implements | Nothing |
Uses | Nothing |
Constants
This class has not constants.
Methods
Show create pages admin notice if it was hidden.
private function force_show_create_pages( ) : void
Since | v1.0.0 |
Save default settings on start
private function set_default_settings( ) : void
Since | v1.0.0 |
Inherited methods
This class has not inherited methods.
Properties
Inherited properties
This class has not inherited properties.