WC_Payment_Gateway_Stripe_ApplePay
extends WC_Payment_Gateway_Stripe
in package
uses
WC_Stripe_Payment_Intent_Trait, TokenizationTrait, ExpressCheckoutTrait, PreOrdersTrait, WooCommerceSubscriptionsTrait
Legacy and deprecated methods are kept here to keep the new AbstractGateway clean. This class ensures compatability with 3rd party code that uses these methods.
Tags
Table of Contents
Properties
- $client : StripeClient
- $has_parent_gateway : mixed
- $id : mixed
- $is_voucher_payment : bool
- $last_payment_error : WP_Error
- $payment_controller : WC_Stripe_Payment_Intent
- $payment_intent_key : string
- $payment_method_token : string
- $payment_token_object : WC_Payment_Token_Stripe
- $payment_type_key : string
- This property is used to determine if a customer is using a saved payment method or a new payment method.
- $PreOrdersTraitFeatures : array<string|int, mixed>
- $processing_payment : bool
- $synchronous : bool
- Is the payment method synchronous or asynchronous
- $template_name : string
- $token_type : string
- Used to create an instance of a WC_Payment_Token
- $WooCommerceSubscriptionsTraitFeatures : array<string|int, mixed>
- $assets : AssetsApi
- $checkout_error : bool
- $ExpressCheckoutTraitFeatures : array<string|int, mixed>
- $has_digital_wallet : bool
- $new_payment_method_label : mixed
- $payment_method_id : 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
- __get() : mixed
- Used to retrieve deprecated properties.
- add_payment_intent_mandate_args() : 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.
- 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_add_payment_method_script_handles() : mixed
- get_cart_script_handles() : array<string|int, mixed>
- get_checkout_script_handles() : array<string|int, mixed>
- get_complete_payment_return_url() : mixed
- get_confirmation_method() : 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_express_checkout_script_handles() : 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_localized_params() : array<string|int, mixed>
- get_method_formats() : mixed
- get_mini_cart_dependencies() : mixed
- get_minicart_script_handles() : array<string|int, mixed>
- get_needs_shipping() : bool
- Return true if shipping is needed.
- get_new_method_label() : mixed
- get_new_payment_method_option_html() : mixed
- get_new_source_id() : mixed
- get_new_source_token() : array<string|int, mixed>|string|WC_Stripe_Gateway|WC_Stripe_Payment_Intent|null
- 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_checkout_url() : mixed
- get_payment_intent_confirmation_args() : mixed
- get_payment_intent_id() : mixed
- get_payment_method_charge_type() : mixed
- get_payment_method_data() : array<string|int, 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_method_type() : string
- Returns the payment method type for the payment method.
- 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_product_script_handles() : array<string|int, mixed>
- get_request_context() : RequestContext
- get_save_payment_method_label() : string
- get_saved_methods_label() : mixed
- get_saved_payment_method_option_html() : string
- get_saved_source_id() : array<string|int, mixed>|string|WC_Stripe_Gateway|WC_Stripe_Payment_Intent|null
- 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_stripe_documentation_url() : mixed
- get_token() : null|WC_Payment_Token_Stripe
- get_tokens() : mixed
- 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.
- handle_setup_intent_for_order() : array<string|int, mixed>|void
- has_enqueued_scripts() : bool
- has_order_lock() : mixed
- Returns true of the order has been locked.
- init_form_fields() : mixed
- init_supports() : mixed
- initialize() : mixed
- is_active() : mixed
- is_cart_section_enabled() : mixed
- is_change_payment_method_request() : bool
- Return true if this request is to change the payment method of a WC Subscription.
- is_deferred_intent_creation() : false
- is_express_checkout_enabled() : mixed
- is_installment_available() : mixed
- is_mandate_required() : mixed
- is_minicart_section_enabled() : mixed
- is_product_section_enabled() : bool
- 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
- 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() : 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() : array<string|int, 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_id() : void
- 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 if the payment method should be saved.
- should_use_saved_payment_method() : bool
- Returns true if the customer is using a saved payment method in the request.
- 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_button_type() : string
- Returns the Apple Pay button type based on the current page.
- 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_intent_checkout_params() : array<string|int, mixed>
- get_shipping_method_id() : mixed
- hooks() : 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>
- requires_confirmation_mandate() : mixed
Properties
$client
public
StripeClient
$client
$has_parent_gateway
public
mixed
$has_parent_gateway
= \false
$id
public
mixed
$id
= 'stripe_applepay'
$is_voucher_payment
public
bool
$is_voucher_payment
= \false
@since 3.3.16
$last_payment_error
public
WP_Error
$last_payment_error
$payment_controller
public
WC_Stripe_Payment_Intent
$payment_controller
$payment_intent_key
public
string
$payment_intent_key
$payment_method_token
public
string
$payment_method_token
= \null
$payment_token_object
public
WC_Payment_Token_Stripe
$payment_token_object
= \null
$payment_type_key
This property is used to determine if a customer is using a saved payment method or a new payment method.
public
string
$payment_type_key
$PreOrdersTraitFeatures
public
static array<string|int, mixed>
$PreOrdersTraitFeatures
= ['pre-orders']
$processing_payment
public
bool
$processing_payment
= \false
$synchronous
Is the payment method synchronous or asynchronous
public
bool
$synchronous
= \true
$template_name
public
string
$template_name
$token_type
Used to create an instance of a WC_Payment_Token
public
string
$token_type
$WooCommerceSubscriptionsTraitFeatures
public
static array<string|int, mixed>
$WooCommerceSubscriptionsTraitFeatures
= ['subscriptions', 'subscription_cancellation', 'multiple_subscriptions', 'subscription_amount_changes', 'subscription_date_changes', 'subscription_payment_method_change_admin', 'subscription_reactivation', 'subscription_suspension', 'subscription_payment_method_change_customer']
$assets
protected
AssetsApi
$assets
$checkout_error
protected
bool
$checkout_error
= \false
$ExpressCheckoutTraitFeatures
protected
static array<string|int, mixed>
$ExpressCheckoutTraitFeatures
= ['wc_stripe_product_checkout', 'wc_stripe_cart_checkout', 'wc_stripe_banner_checkout', 'wc_stripe_mini_cart_checkout']
$has_digital_wallet
protected
bool
$has_digital_wallet
= \false
Tags
$new_payment_method_label
protected
mixed
$new_payment_method_label
= ''
$payment_method_id
protected
string
$payment_method_id
$payment_method_type
protected
mixed
$payment_method_type
= 'card'
$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 ...$args) : mixed
Parameters
- $args : mixed
__get()
Used to retrieve deprecated properties.
public
__get(mixed $key) : mixed
Parameters
- $key : mixed
add_payment_intent_mandate_args()
public
add_payment_intent_mandate_args(mixed &$args, mixed $order) : mixed
Parameters
- $args : mixed
- $order : 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_Errordisplay_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([string $page = '' ]) : mixed
Parameters
- $page : string = ''
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_add_payment_method_script_handles()
public
get_add_payment_method_script_handles() : mixed
get_cart_script_handles()
public
get_cart_script_handles() : array<string|int, mixed>
Return values
array<string|int, mixed>get_checkout_script_handles()
public
get_checkout_script_handles() : array<string|int, mixed>
Return values
array<string|int, mixed>get_complete_payment_return_url()
public
get_complete_payment_return_url([mixed $order = null ]) : mixed
Parameters
- $order : mixed = null
get_confirmation_method()
public
get_confirmation_method([WC_Order $order = null ]) : mixed
Parameters
- $order : WC_Order = 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_express_checkout_script_handles()
public
get_express_checkout_script_handles() : array<string|int, mixed>
Return values
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_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_minicart_script_handles()
public
get_minicart_script_handles() : array<string|int, mixed>
Return values
array<string|int, mixed>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_payment_method_option_html()
public
get_new_payment_method_option_html() : mixed
get_new_source_id()
public
get_new_source_id() : mixed
get_new_source_token()
public
get_new_source_token() : array<string|int, mixed>|string|WC_Stripe_Gateway|WC_Stripe_Payment_Intent|null
Return values
array<string|int, mixed>|string|WC_Stripe_Gateway|WC_Stripe_Payment_Intent|nullget_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_checkout_url()
public
get_payment_intent_checkout_url(PaymentIntent $intent, WC_Order $order[, mixed $type = 'payment_intent' ]) : mixed
Parameters
- $intent : PaymentIntent
- $order : WC_Order
- $type : mixed = 'payment_intent'
get_payment_intent_confirmation_args()
public
get_payment_intent_confirmation_args(PaymentIntent $intent, WC_Order $order) : mixed
Parameters
- $intent : PaymentIntent
- $order : WC_Order
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_data()
public
get_payment_method_data() : array<string|int, mixed>
Return values
array<string|int, 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_method_type()
Returns the payment method type for the payment method.
public
get_payment_method_type() : string
Return values
stringget_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(string $method_id[, Card|array<string|int, mixed> $method_details = null ]) : mixed
Parameters
- $method_id : string
- $method_details : Card|array<string|int, mixed> = null
get_payment_token_type()
public
get_payment_token_type() : string
Tags
Return values
stringget_prefix()
public
get_prefix() : mixed
get_product_script_handles()
public
get_product_script_handles() : array<string|int, mixed>
Return values
array<string|int, 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_payment_method_option_html()
public
get_saved_payment_method_option_html(WC_Payment_Token_Stripe $token[, mixed $checked = true ]) : string
Parameters
- $token : WC_Payment_Token_Stripe
- $checked : mixed = true
Return values
stringget_saved_source_id()
public
get_saved_source_id() : array<string|int, mixed>|string|WC_Stripe_Gateway|WC_Stripe_Payment_Intent|null
Return values
array<string|int, mixed>|string|WC_Stripe_Gateway|WC_Stripe_Payment_Intent|nullget_setup_intent()
public
get_setup_intent() : mixed
get_setup_intent_checkout_params()
public
get_setup_intent_checkout_params(mixed $intent, mixed $order) : mixed
Parameters
- $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_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
Parameters
- $token_id : string
- $user_id : int
Return values
null|WC_Payment_Token_Stripeget_tokens()
public
get_tokens() : mixed
get_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
handle_setup_intent_for_order()
public
handle_setup_intent_for_order(WC_Order $order) : array<string|int, mixed>|void
Parameters
- $order : WC_Order
Return values
array<string|int, mixed>|voidhas_enqueued_scripts()
public
has_enqueued_scripts(WC_Stripe_Frontend_Scripts $scripts) : bool
Parameters
- $scripts : WC_Stripe_Frontend_Scripts
Tags
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
init_form_fields()
public
init_form_fields() : mixed
init_supports()
public
init_supports() : mixed
initialize()
public
initialize() : mixed
is_active()
public
is_active(mixed $key) : mixed
Parameters
- $key : mixed
is_cart_section_enabled()
public
is_cart_section_enabled() : 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_deferred_intent_creation()
public
is_deferred_intent_creation() : false
Tags
Return values
falseis_express_checkout_enabled()
public
is_express_checkout_enabled() : mixed
is_installment_available()
public
is_installment_available() : mixed
is_mandate_required()
public
is_mandate_required([mixed $order = null ]) : mixed
Parameters
- $order : mixed = null
is_minicart_section_enabled()
public
is_minicart_section_enabled() : mixed
is_product_section_enabled()
public
is_product_section_enabled(mixed $product) : bool
Parameters
- $product : mixed
Tags
Return values
boolmini_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
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) : mixed
Parameters
- $order : WC_Order
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) : array<string|int, mixed>
Parameters
- $order : WC_Order
Return values
array<string|int, mixed>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
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_id()
public
set_payment_method_id(mixed $value) : void
Parameters
- $value : mixed
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 if the payment method should be saved.
public
should_save_payment_method(WC_Order $order) : bool
Parameters
- $order : WC_Order
Return values
boolshould_use_saved_payment_method()
Returns true if the customer is using a saved payment method in the request.
public
should_use_saved_payment_method() : bool
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_button_type()
Returns the Apple Pay button type based on the current page.
protected
get_button_type() : string
Return values
stringget_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_intent_checkout_params()
protected
get_payment_intent_checkout_params(mixed $intent, WC_Order $order, mixed $type) : array<string|int, mixed>
Parameters
- $intent : mixed
- $order : WC_Order
- $type : mixed
Return values
array<string|int, mixed>get_shipping_method_id()
protected
get_shipping_method_id(string $id, string $index) : mixed
Parameters
- $id : string
- $index : string
hooks()
protected
hooks() : 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
Tags
Return values
array<string|int, mixed>requires_confirmation_mandate()
protected
requires_confirmation_mandate(mixed $intent) : mixed
Parameters
- $intent : mixed