WC_Payment_Gateway_Stripe_Revolut
extends WC_Payment_Gateway_Stripe_Local_Payment
in package
uses
WC_Stripe_Local_Payment_Intent_Trait
Local payment method classes should extend this abstract class
Tags
Table of Contents
Properties
- $countries : mixed
- $currencies : array<string|int, mixed>
- Currencies this gateway accepts
- $gateway : WC_Stripe_Gateway
- $is_voucher_payment : bool
- $last_payment_error : WP_Error
- $limited_countries : array<string|int, mixed>
- $local_payment_type : mixed
- $payment_intent_key : string
- $payment_method_token : string
- $payment_object : WC_Stripe_Payment
- $payment_token_object : WC_Payment_Token_Stripe
- $payment_type_key : string
- $processing_payment : bool
- $save_source_key : string
- $saved_method_key : string
- $synchronous : bool
- Is the payment method synchronous or asynchronous
- $template_name : string
- $token_key : string
- $token_type : string
- Used to create an instance of a WC_Payment_Token
- $checkout_error : bool
- $has_digital_wallet : bool
- $local_payment_description : mixed
- $new_payment_method_label : mixed
- $new_source_token : string
- $payment_method_type : mixed
- $post_payment_processes : array<string|int, mixed>
- $request_context : RequestContext
- $saved_payment_methods_label : mixed
- $setup_intent : SetupIntent
- $supports_save_payment_method : mixed
- $tab_title : mixed
- $wp_error : WP_Error
- $admin_output : mixed
Methods
- __construct() : mixed
- add_payment_method() : mixed
- {@inheritDoc}
- add_stripe_order_args() : mixed
- Gateways can override this method to add attributes to the Stripe object before it's sent to Stripe.
- add_to_cart_response() : mixed
- Decorate the response with data specific to the gateway.
- admin_nav_tab() : mixed
- admin_options() : mixed
- banner_checkout_enabled() : bool
- Return true if checkout page banner is enabled for this gateway
- capture_charge() : mixed
- Captures the charge for the Stripe order.
- cart_checkout_enabled() : bool
- Return true if cart page checkout is enabled for this gateway
- cart_fields() : mixed
- create_customer() : mixed
- Create a customer in the stripe gateway.
- create_payment_method() : WC_Payment_Token_Stripe|WP_Error
- Creates a payment method in Stripe.
- delete_payment_method() : mixed
- display_errors() : mixed
- Display admin error messages.
- enqueue_add_payment_method_scripts() : mixed
- Enqueue scripts needed by the gateway on the add payment method page.
- enqueue_admin_scripts() : mixed
- enqueue_cart_scripts() : mixed
- Enqueue scripts needed by the gateway on the cart page.
- enqueue_checkout_scripts() : mixed
- Enqueue scripts needed by the gateway on the checkout page.
- enqueue_frontend_scripts() : mixed
- Enqueue scripts needed by the gateway on the frontend of the WC shop.
- enqueue_mini_cart_scripts() : mixed
- enqueue_payment_method_styles() : void
- enqueue_product_scripts() : mixed
- Enqueue scripts needed by the gateway on the product page.
- generate_button_demo_html() : mixed
- generate_description_html() : mixed
- generate_multi_select_countries_html() : mixed
- generate_multiselect_html() : mixed
- generate_paragraph_html() : mixed
- generate_stripe_button_html() : mixed
- get_complete_payment_return_url() : mixed
- get_custom_attribute_html() : mixed
- get_display_items() : mixed
- Returns a formatted array of items for display in the payment gateway's payment sheet.
- get_display_items_for_cart() : array<string|int, mixed>
- get_element_options() : mixed|void
- get_element_params() : array<string|int, array<string|int, mixed>>
- get_formatted_shipping_method() : array<string|int, mixed>
- get_formatted_shipping_methods() : array<string|int, mixed>
- get_generic_error() : mixed
- get_local_payment_description() : mixed
- Return a description of the payment method.
- get_local_payment_return_url() : string
- get_local_payment_settings() : array<string|int, mixed>
- Return an array of form fields for the gateway.
- get_localized_params() : array<string|int, mixed>
- get_method_formats() : mixed
- get_mini_cart_dependencies() : mixed
- get_needs_shipping() : bool
- Return true if shipping is needed.
- get_new_method_label() : mixed
- get_new_source_id() : mixed
- get_new_source_token() : mixed
- get_order_button_text() : string
- get_order_description() : mixed
- get_order_error() : array<string|int, mixed>
- Return a failed order response.
- get_order_meta_data() : mixed
- Given a meta key, see if there is a value for that key in another plugin.
- get_order_status_option() : mixed
- get_payment_element_options() : mixed
- get_payment_intent_id() : mixed
- get_payment_method_charge_type() : mixed
- get_payment_method_formats() : mixed
- get_payment_method_from_charge() : mixed
- Given a charge object, return the ID of the payment method used for the charge.
- get_payment_method_from_request() : mixed
- Returns the payment method the customer wants to use.
- get_payment_source() : mixed
- Return the payment source the customer has chosen to use.
- get_payment_token() : mixed
- get_payment_token_type() : string
- get_prefix() : mixed
- get_request_context() : RequestContext
- get_save_payment_method_label() : string
- get_saved_methods_label() : mixed
- get_saved_source_id() : mixed
- get_setup_intent() : mixed
- get_setup_intent_checkout_params() : mixed
- get_shipping_methods() : array<string|int, mixed>
- Returns a formatted array of shipping methods for display in the payment gateway's payment sheet.
- get_shipping_packages() : array<string|int, mixed>
- get_source_args() : array<string|int, mixed>
- get_source_redirect_url() : mixed
- get_stripe_documentation_url() : mixed
- get_token() : null|WC_Payment_Token_Stripe_CC
- get_transaction_url() : mixed
- get_update_shipping_address_response() : mixed
- Decorate the update shipping address respond with data.
- get_update_shipping_method_response() : mixed
- Decorate the update shipping method reponse with data.
- get_update_source_args() : mixed
- has_enqueued_scripts() : bool
- has_order_lock() : mixed
- Returns true of the order has been locked.
- hooks() : mixed
- init_form_fields() : mixed
- init_supports() : mixed
- is_active() : mixed
- is_change_payment_method_request() : bool
- Return true if this request is to change the payment method of a WC Subscription.
- is_installment_available() : mixed
- is_local_payment_available() : mixed
- is_mandate_required() : mixed
- mini_cart_enabled() : bool
- Return true if mini-cart checkout is enabled for this gateway
- mini_cart_fields() : mixed
- output_display_items() : mixed
- Outputs fields required by Google Pay to render the payment wallet.
- output_settings_nav() : mixed
- payment_fields() : mixed
- payment_methods_list_item() : mixed
- process_admin_options() : mixed
- Added override to provide more control on which fields are saved and which are skipped.
- process_payment() : mixed
- {@inheritDoc}
- process_pre_order() : array<string|int, mixed>
- process_pre_order_payment() : mixed
- process_refund() : mixed
- {@inheritDoc}
- process_subscription_payment_method_updated() : array<string|int, mixed>|array<string|int, string>
- process_zero_total_order() : mixed
- product_checkout_enabled() : bool
- Return true if product page checkout is enabled for this gateway
- product_fields() : mixed
- Output the product payment fields.
- release_order_lock() : mixed
- Removes the lock on the order
- retrieve_charge() : WP_Error|Charge
- Return the \Stripe\Charge object
- save_order_meta() : mixed
- Save the Stripe data to the order.
- save_payment_method() : WP_Error|bool
- Save the customer's payment method.
- save_zero_total_meta() : mixed
- saved_payment_methods() : mixed
- scheduled_subscription_payment() : mixed
- set_new_source_token() : mixed
- set_order_lock() : mixed
- Sets a lock on the order.
- set_payment_method_token() : mixed
- Sets the ID of a payment token.
- set_payment_save_error() : mixed
- Set an error on the order.
- set_post_payment_process() : mixed
- set_request_context() : mixed
- set_setup_intent() : mixed
- should_save_payment_method() : bool
- Return true of the payment method should be saved.
- show_save_payment_method_html() : bool|mixed|void|null
- show_save_source() : bool
- Returns true if the save payment method checkbox can be displayed.
- subscription_payment_meta() : mixed
- trigger_post_payment_processes() : mixed
- update_failing_payment_method() : mixed
- use_saved_source() : mixed
- Return true of the customer is using a saved payment method.
- validate_multi_select_countries_field() : mixed
- validate_payment_sections_field() : mixed
- void_charge() : mixed
- Void the Stripe charge.
- get_display_item_for_cart() : array<string|int, mixed>
- get_display_item_for_order() : mixed
- get_display_item_for_product() : array<string|int, mixed>
- get_display_items_for_order() : array<string|int, mixed>
- get_formatted_shipping_label() : mixed
- get_payment_description() : string
- Return a description for (for admin sections) describing the required currency & or billing country(s).
- get_shipping_method_id() : mixed
- get_source_owner_args() : array<string|int, mixed>
- is_processing_scheduled_payment() : bool
- Returns true if a scheduled subscription payment is being processed.
- order_contains_pre_order() : mixed
- Pre orders can't be mixed with regular products.
- pre_order_requires_tokenization() : bool
- process_change_payment_method_request() : array<string|int, mixed>
Properties
$countries
public
mixed
$countries
= array()
$currencies
Currencies this gateway accepts
public
array<string|int, mixed>
$currencies
= array()
$gateway
public
WC_Stripe_Gateway
$gateway
$is_voucher_payment
public
bool
$is_voucher_payment
= \false
@since 3.3.16
$last_payment_error
public
WP_Error
$last_payment_error
$limited_countries
public
array<string|int, mixed>
$limited_countries
= array()
Tags
$local_payment_type
public
mixed
$local_payment_type
= ''
$payment_intent_key
public
string
$payment_intent_key
$payment_method_token
public
string
$payment_method_token
= \null
$payment_object
public
WC_Stripe_Payment
$payment_object
$payment_token_object
public
WC_Payment_Token_Stripe
$payment_token_object
= \null
$payment_type_key
public
string
$payment_type_key
$processing_payment
public
bool
$processing_payment
= \false
$save_source_key
public
string
$save_source_key
$saved_method_key
public
string
$saved_method_key
$synchronous
Is the payment method synchronous or asynchronous
public
bool
$synchronous
= \true
$template_name
public
string
$template_name
$token_key
public
string
$token_key
$token_type
Used to create an instance of a WC_Payment_Token
public
string
$token_type
= 'Stripe_Local'
$checkout_error
protected
bool
$checkout_error
= \false
$has_digital_wallet
protected
bool
$has_digital_wallet
= \false
Tags
$local_payment_description
protected
mixed
$local_payment_description
= ''
$new_payment_method_label
protected
mixed
$new_payment_method_label
= ''
$new_source_token
protected
string
$new_source_token
= \null
$payment_method_type
protected
mixed
$payment_method_type
= 'revolut_pay'
$post_payment_processes
protected
array<string|int, mixed>
$post_payment_processes
= array()
$request_context
protected
RequestContext
$request_context
$saved_payment_methods_label
protected
mixed
$saved_payment_methods_label
= ''
$setup_intent
protected
SetupIntent
$setup_intent
$supports_save_payment_method
protected
mixed
$supports_save_payment_method
= \false
$tab_title
protected
mixed
$tab_title
= ''
$wp_error
protected
WP_Error
$wp_error
$admin_output
private
mixed
$admin_output
= \false
Methods
__construct()
public
__construct() : mixed
add_payment_method()
{@inheritDoc}
public
add_payment_method() : mixed
Tags
add_stripe_order_args()
Gateways can override this method to add attributes to the Stripe object before it's sent to Stripe.
public
add_stripe_order_args(array<string|int, mixed> &$args, WC_Order $order[, mixed $intent = null ]) : mixed
Parameters
- $args : array<string|int, mixed>
- $order : WC_Order
- $intent : mixed = null
add_to_cart_response()
Decorate the response with data specific to the gateway.
public
add_to_cart_response(mixed $data) : mixed
Parameters
- $data : mixed
admin_nav_tab()
public
admin_nav_tab(mixed $tabs) : mixed
Parameters
- $tabs : mixed
admin_options()
public
admin_options() : mixed
banner_checkout_enabled()
Return true if checkout page banner is enabled for this gateway
public
banner_checkout_enabled() : bool
Return values
boolcapture_charge()
Captures the charge for the Stripe order.
public
capture_charge(float $amount, WC_Order $order) : mixed
Parameters
- $amount : float
- $order : WC_Order
cart_checkout_enabled()
Return true if cart page checkout is enabled for this gateway
public
cart_checkout_enabled() : bool
Return values
boolcart_fields()
public
cart_fields() : mixed
create_customer()
Create a customer in the stripe gateway.
public
create_customer(int $user_id) : mixed
Parameters
- $user_id : int
Tags
create_payment_method()
Creates a payment method in Stripe.
public
create_payment_method(string $id, string $customer_id) : WC_Payment_Token_Stripe|WP_Error
Parameters
- $id : string
-
payment method id
- $customer_id : string
-
WC Stripe customer ID
Return values
WC_Payment_Token_Stripe|WP_Errordelete_payment_method()
public
delete_payment_method(string $token_id, WC_Payment_Token_Stripe $token) : mixed
Parameters
- $token_id : string
- $token : WC_Payment_Token_Stripe
display_errors()
Display admin error messages.
public
display_errors() : mixed
enqueue_add_payment_method_scripts()
Enqueue scripts needed by the gateway on the add payment method page.
public
enqueue_add_payment_method_scripts(WC_Stripe_Frontend_Scripts $scripts) : mixed
Parameters
- $scripts : WC_Stripe_Frontend_Scripts
enqueue_admin_scripts()
public
enqueue_admin_scripts() : mixed
enqueue_cart_scripts()
Enqueue scripts needed by the gateway on the cart page.
public
enqueue_cart_scripts(WC_Stripe_Frontend_Scripts $scripts) : mixed
Parameters
- $scripts : WC_Stripe_Frontend_Scripts
enqueue_checkout_scripts()
Enqueue scripts needed by the gateway on the checkout page.
public
enqueue_checkout_scripts(WC_Stripe_Frontend_Scripts $scripts) : mixed
Parameters
- $scripts : WC_Stripe_Frontend_Scripts
enqueue_frontend_scripts()
Enqueue scripts needed by the gateway on the frontend of the WC shop.
public
enqueue_frontend_scripts([mixed $page = '' ]) : mixed
Parameters
- $page : mixed = ''
enqueue_mini_cart_scripts()
public
enqueue_mini_cart_scripts(WC_Stripe_Frontend_Scripts $scripts) : mixed
Parameters
- $scripts : WC_Stripe_Frontend_Scripts
Tags
enqueue_payment_method_styles()
public
enqueue_payment_method_styles() : void
Tags
enqueue_product_scripts()
Enqueue scripts needed by the gateway on the product page.
public
enqueue_product_scripts(WC_Stripe_Frontend_Scripts $scripts) : mixed
Parameters
- $scripts : WC_Stripe_Frontend_Scripts
generate_button_demo_html()
public
generate_button_demo_html(mixed $key, mixed $data) : mixed
Parameters
- $key : mixed
- $data : mixed
generate_description_html()
public
generate_description_html(mixed $key, mixed $data) : mixed
Parameters
- $key : mixed
- $data : mixed
generate_multi_select_countries_html()
public
generate_multi_select_countries_html(mixed $key, mixed $data) : mixed
Parameters
- $key : mixed
- $data : mixed
generate_multiselect_html()
public
generate_multiselect_html(mixed $key, mixed $data) : mixed
Parameters
- $key : mixed
- $data : mixed
generate_paragraph_html()
public
generate_paragraph_html(mixed $key, mixed $data) : mixed
Parameters
- $key : mixed
- $data : mixed
generate_stripe_button_html()
public
generate_stripe_button_html(mixed $key, mixed $data) : mixed
Parameters
- $key : mixed
- $data : mixed
get_complete_payment_return_url()
public
get_complete_payment_return_url([mixed $order = null ]) : mixed
Parameters
- $order : mixed = null
get_custom_attribute_html()
public
get_custom_attribute_html(mixed $attribs) : mixed
Parameters
- $attribs : mixed
get_display_items()
Returns a formatted array of items for display in the payment gateway's payment sheet.
public
get_display_items([stirng $page = 'checkout' ][, mixed $order = null ]) : mixed
Parameters
- $page : stirng = 'checkout'
- $order : mixed = null
Tags
get_display_items_for_cart()
public
get_display_items_for_cart(WC_Cart $cart[, array<string|int, mixed> $items = array() ]) : array<string|int, mixed>
Parameters
- $cart : WC_Cart
- $items : array<string|int, mixed> = array()
Tags
Return values
array<string|int, mixed>get_element_options()
public
get_element_options([array<string|int, mixed> $options = array() ]) : mixed|void
Parameters
- $options : array<string|int, mixed> = array()
Tags
Return values
mixed|voidget_element_params()
public
get_element_params() : array<string|int, array<string|int, mixed>>
Return values
array<string|int, array<string|int, mixed>>get_formatted_shipping_method()
public
get_formatted_shipping_method(float $price, WC_Shipping_Rate $rate, string $i, array<string|int, mixed> $package, bool $incl_tax) : array<string|int, mixed>
Parameters
- $price : float
- $rate : WC_Shipping_Rate
- $i : string
- $package : array<string|int, mixed>
- $incl_tax : bool
Tags
Return values
array<string|int, mixed>get_formatted_shipping_methods()
public
get_formatted_shipping_methods([array<string|int, mixed> $methods = array() ]) : array<string|int, mixed>
Parameters
- $methods : array<string|int, mixed> = array()
Tags
Return values
array<string|int, mixed>get_generic_error()
public
get_generic_error([WP_Error $result = null ]) : mixed
Parameters
- $result : WP_Error = null
Tags
get_local_payment_description()
Return a description of the payment method.
public
get_local_payment_description() : mixed
get_local_payment_return_url()
public
get_local_payment_return_url(WC_Order $order) : string
Parameters
- $order : WC_Order
Return values
stringget_local_payment_settings()
Return an array of form fields for the gateway.
public
get_local_payment_settings() : array<string|int, mixed>
Return values
array<string|int, mixed>get_localized_params()
public
get_localized_params() : array<string|int, mixed>
Return values
array<string|int, mixed>get_method_formats()
public
get_method_formats() : mixed
get_mini_cart_dependencies()
public
get_mini_cart_dependencies(array<string|int, mixed> $deps, mixed $scripts) : mixed
Parameters
- $deps : array<string|int, mixed>
- $scripts : mixed
Tags
get_needs_shipping()
Return true if shipping is needed.
public
get_needs_shipping() : bool
Shipping is based on things like if the cart or product needs shipping.
Return values
boolget_new_method_label()
public
get_new_method_label() : mixed
get_new_source_id()
public
get_new_source_id() : mixed
get_new_source_token()
public
get_new_source_token() : mixed
get_order_button_text()
public
get_order_button_text(string $text) : string
Parameters
- $text : string
Tags
Return values
stringget_order_description()
public
get_order_description(WC_Order $order) : mixed
Parameters
- $order : WC_Order
get_order_error()
Return a failed order response.
public
get_order_error([WP_Error $error = null ]) : array<string|int, mixed>
Parameters
- $error : WP_Error = null
Return values
array<string|int, mixed>get_order_meta_data()
Given a meta key, see if there is a value for that key in another plugin.
public
get_order_meta_data(string $meta_key, WC_Order $order[, string $context = 'view' ]) : mixed
This acts as a lazy conversion method for merchants that have switched to our plugin from other plugins.
Parameters
- $meta_key : string
- $order : WC_Order
- $context : string = 'view'
Tags
get_order_status_option()
public
get_order_status_option() : mixed
get_payment_element_options()
public
get_payment_element_options() : mixed
get_payment_intent_id()
public
get_payment_intent_id() : mixed
get_payment_method_charge_type()
public
get_payment_method_charge_type() : mixed
get_payment_method_formats()
public
get_payment_method_formats() : mixed
get_payment_method_from_charge()
Given a charge object, return the ID of the payment method used for the charge.
public
get_payment_method_from_charge(Charge $charge) : mixed
Parameters
- $charge : Charge
Tags
get_payment_method_from_request()
Returns the payment method the customer wants to use.
public
get_payment_method_from_request() : mixed
This can be a saved payment method or a new payment method.
get_payment_source()
Return the payment source the customer has chosen to use.
public
get_payment_source() : mixed
This can be a saved source or a one time use source.
get_payment_token()
public
get_payment_token(mixed $method_id[, mixed $method_details = array() ]) : mixed
Parameters
- $method_id : mixed
- $method_details : mixed = array()
get_payment_token_type()
public
get_payment_token_type() : string
Tags
Return values
stringget_prefix()
public
get_prefix() : mixed
get_request_context()
public
get_request_context() : RequestContext
Return values
RequestContextget_save_payment_method_label()
public
get_save_payment_method_label() : string
Tags
Return values
stringget_saved_methods_label()
public
get_saved_methods_label() : mixed
get_saved_source_id()
public
get_saved_source_id() : mixed
get_setup_intent()
public
get_setup_intent() : mixed
get_setup_intent_checkout_params()
public
get_setup_intent_checkout_params(mixed $setup_intent, mixed $order) : mixed
Parameters
- $setup_intent : mixed
- $order : mixed
get_shipping_methods()
Returns a formatted array of shipping methods for display in the payment gateway's payment sheet.
public
get_shipping_methods() : array<string|int, mixed>
Return values
array<string|int, mixed>get_shipping_packages()
public
get_shipping_packages() : array<string|int, mixed>
Tags
Return values
array<string|int, mixed>get_source_args()
public
get_source_args(WC_Order $order) : array<string|int, mixed>
Parameters
- $order : WC_Order
Return values
array<string|int, mixed>get_source_redirect_url()
public
get_source_redirect_url(Source $source, WC_Order $order) : mixed
Parameters
- $source : Source
- $order : WC_Order
get_stripe_documentation_url()
public
get_stripe_documentation_url() : mixed
get_token()
public
get_token(string $token_id, int $user_id) : null|WC_Payment_Token_Stripe_CC
Parameters
- $token_id : string
- $user_id : int
Return values
null|WC_Payment_Token_Stripe_CCget_transaction_url()
public
get_transaction_url(mixed $order) : mixed
Parameters
- $order : mixed
get_update_shipping_address_response()
Decorate the update shipping address respond with data.
public
get_update_shipping_address_response(mixed $data) : mixed
Parameters
- $data : mixed
get_update_shipping_method_response()
Decorate the update shipping method reponse with data.
public
get_update_shipping_method_response(mixed $data) : mixed
Parameters
- $data : mixed
get_update_source_args()
public
get_update_source_args(WC_Order $order) : mixed
Parameters
- $order : WC_Order
Tags
has_enqueued_scripts()
public
has_enqueued_scripts(mixed $scripts) : bool
Parameters
- $scripts : mixed
Return values
boolhas_order_lock()
Returns true of the order has been locked.
public
has_order_lock(WC_Order|int $order) : mixed
If the lock exists and is greater than current time method returns true;
Parameters
- $order : WC_Order|int
hooks()
public
hooks() : mixed
init_form_fields()
public
init_form_fields() : mixed
init_supports()
public
init_supports() : mixed
is_active()
public
is_active(mixed $key) : mixed
Parameters
- $key : mixed
is_change_payment_method_request()
Return true if this request is to change the payment method of a WC Subscription.
public
is_change_payment_method_request() : bool
Return values
boolis_installment_available()
public
is_installment_available() : mixed
is_local_payment_available()
public
is_local_payment_available() : mixed
is_mandate_required()
public
is_mandate_required([mixed $order = null ]) : mixed
Parameters
- $order : mixed = null
mini_cart_enabled()
Return true if mini-cart checkout is enabled for this gateway
public
mini_cart_enabled() : bool
Tags
Return values
boolmini_cart_fields()
public
mini_cart_fields() : mixed
output_display_items()
Outputs fields required by Google Pay to render the payment wallet.
public
output_display_items([string $page = 'checkout' ][, array<string|int, mixed> $data = array() ]) : mixed
Parameters
- $page : string = 'checkout'
- $data : array<string|int, mixed> = array()
output_settings_nav()
public
output_settings_nav() : mixed
payment_fields()
public
payment_fields() : mixed
payment_methods_list_item()
public
payment_methods_list_item(array<string|int, mixed> $item, WC_Payment_Token_Stripe_CC $payment_token) : mixed
Parameters
- $item : array<string|int, mixed>
- $payment_token : WC_Payment_Token_Stripe_CC
process_admin_options()
Added override to provide more control on which fields are saved and which are skipped.
public
process_admin_options() : mixed
This plugin has custom setting fields like "paragraph" that are for info display only and not for saving.
Tags
process_payment()
{@inheritDoc}
public
process_payment(mixed $order_id) : mixed
Parameters
- $order_id : mixed
Tags
process_pre_order()
public
process_pre_order(WC_Order $order) : array<string|int, mixed>
Parameters
- $order : WC_Order
Return values
array<string|int, mixed>process_pre_order_payment()
public
process_pre_order_payment(WC_Order $order) : mixed
Parameters
- $order : WC_Order
process_refund()
{@inheritDoc}
public
process_refund(mixed $order_id[, mixed $amount = null ][, mixed $reason = '' ]) : mixed
Parameters
- $order_id : mixed
- $amount : mixed = null
- $reason : mixed = ''
Tags
process_subscription_payment_method_updated()
public
process_subscription_payment_method_updated(WC_Subscription $subscription) : array<string|int, mixed>|array<string|int, string>
Parameters
- $subscription : WC_Subscription
Return values
array<string|int, mixed>|array<string|int, string>process_zero_total_order()
public
process_zero_total_order(WC_Order $order) : mixed
Parameters
- $order : WC_Order
product_checkout_enabled()
Return true if product page checkout is enabled for this gateway
public
product_checkout_enabled() : bool
Return values
boolproduct_fields()
Output the product payment fields.
public
product_fields() : mixed
release_order_lock()
Removes the lock on the order
public
release_order_lock(WC_Order|int $order) : mixed
Parameters
- $order : WC_Order|int
retrieve_charge()
Return the \Stripe\Charge object
public
retrieve_charge(string $charge_id[, string $mode = '' ]) : WP_Error|Charge
Parameters
- $charge_id : string
- $mode : string = ''
Return values
WP_Error|Chargesave_order_meta()
Save the Stripe data to the order.
public
save_order_meta(WC_Order $order, Charge $charge) : mixed
Parameters
- $order : WC_Order
- $charge : Charge
save_payment_method()
Save the customer's payment method.
public
save_payment_method(string $id, WC_Order $order[, mixed $payment_details = null ]) : WP_Error|bool
If the payment method has already been saved to the customer then simply return true.
Parameters
- $id : string
- $order : WC_Order
- $payment_details : mixed = null
Return values
WP_Error|boolsave_zero_total_meta()
public
save_zero_total_meta(WC_Order $order[, mixed $token = null ]) : mixed
Parameters
- $order : WC_Order
- $token : mixed = null
saved_payment_methods()
public
saved_payment_methods([mixed $tokens = array() ]) : mixed
Parameters
- $tokens : mixed = array()
scheduled_subscription_payment()
public
scheduled_subscription_payment(float $amount, WC_Order $order) : mixed
Parameters
- $amount : float
- $order : WC_Order
set_new_source_token()
public
set_new_source_token(mixed $token) : mixed
Parameters
- $token : mixed
set_order_lock()
Sets a lock on the order.
public
set_order_lock(WC_Order|int $order) : mixed
Default behavior is a 2 minute lock.
Parameters
- $order : WC_Order|int
set_payment_method_token()
Sets the ID of a payment token.
public
set_payment_method_token(string $id) : mixed
Parameters
- $id : string
set_payment_save_error()
Set an error on the order.
public
set_payment_save_error(WC_Order $order, WP_Error $error) : mixed
This error is used on the frontend to alert customer's to a failed payment method save.
Parameters
- $order : WC_Order
- $error : WP_Error
set_post_payment_process()
public
set_post_payment_process(mixed $callback) : mixed
Parameters
- $callback : mixed
set_request_context()
public
set_request_context(mixed $value) : mixed
Parameters
- $value : mixed
set_setup_intent()
public
set_setup_intent(mixed $value) : mixed
Parameters
- $value : mixed
should_save_payment_method()
Return true of the payment method should be saved.
public
should_save_payment_method(WC_Order $order) : bool
Parameters
- $order : WC_Order
Return values
boolshow_save_payment_method_html()
public
show_save_payment_method_html() : bool|mixed|void|null
Tags
Return values
bool|mixed|void|nullshow_save_source()
Returns true if the save payment method checkbox can be displayed.
public
show_save_source() : bool
Return values
boolsubscription_payment_meta()
public
subscription_payment_meta(array<string|int, mixed> $payment_meta, WC_Subscription $subscription) : mixed
Parameters
- $payment_meta : array<string|int, mixed>
- $subscription : WC_Subscription
trigger_post_payment_processes()
public
trigger_post_payment_processes(WC_Order $order, WC_Payment_Gateway_Stripe $gateway) : mixed
Parameters
- $order : WC_Order
- $gateway : WC_Payment_Gateway_Stripe
update_failing_payment_method()
public
update_failing_payment_method(WC_Subscription $subscription, WC_Order $order) : mixed
Parameters
- $subscription : WC_Subscription
- $order : WC_Order
use_saved_source()
Return true of the customer is using a saved payment method.
public
use_saved_source() : mixed
validate_multi_select_countries_field()
public
validate_multi_select_countries_field(mixed $key, mixed $value) : mixed
Parameters
- $key : mixed
- $value : mixed
validate_payment_sections_field()
public
validate_payment_sections_field(mixed $key, mixed $value) : mixed
Parameters
- $key : mixed
- $value : mixed
void_charge()
Void the Stripe charge.
public
void_charge(WC_Order $order) : mixed
Parameters
- $order : WC_Order
get_display_item_for_cart()
protected
get_display_item_for_cart(float $price, string $label, string $type, mixed ...$args) : array<string|int, mixed>
Parameters
- $price : float
- $label : string
- $type : string
- $args : mixed
Tags
Return values
array<string|int, mixed>get_display_item_for_order()
protected
get_display_item_for_order(float $price, string $label, WC_Order $order, string $type, mixed ...$args) : mixed
Parameters
- $price : float
- $label : string
- $order : WC_Order
- $type : string
- $args : mixed
get_display_item_for_product()
protected
get_display_item_for_product(WC_Product $product) : array<string|int, mixed>
Parameters
- $product : WC_Product
Tags
Return values
array<string|int, mixed>get_display_items_for_order()
protected
get_display_items_for_order(WC_Order $order[, array<string|int, mixed> $items = array() ]) : array<string|int, mixed>
Parameters
- $order : WC_Order
- $items : array<string|int, mixed> = array()
Tags
Return values
array<string|int, mixed>get_formatted_shipping_label()
protected
get_formatted_shipping_label(float $price, WC_Shipping_Rate $rate, bool $incl_tax) : mixed
Parameters
- $price : float
- $rate : WC_Shipping_Rate
- $incl_tax : bool
Tags
get_payment_description()
Return a description for (for admin sections) describing the required currency & or billing country(s).
protected
get_payment_description() : string
Return values
stringget_shipping_method_id()
protected
get_shipping_method_id(string $id, string $index) : mixed
Parameters
- $id : string
- $index : string
get_source_owner_args()
protected
get_source_owner_args(WC_Order $order) : array<string|int, mixed>
Parameters
- $order : WC_Order
Return values
array<string|int, mixed>is_processing_scheduled_payment()
Returns true if a scheduled subscription payment is being processed.
protected
is_processing_scheduled_payment() : bool
Tags
Return values
boolorder_contains_pre_order()
Pre orders can't be mixed with regular products.
protected
order_contains_pre_order(WC_Order $order) : mixed
Parameters
- $order : WC_Order
pre_order_requires_tokenization()
protected
pre_order_requires_tokenization(WC_Order $order) : bool
Parameters
- $order : WC_Order
Return values
boolprocess_change_payment_method_request()
protected
process_change_payment_method_request(WC_Subscription $subscription) : array<string|int, mixed>
Parameters
- $subscription : WC_Subscription