AbstractLegacyGateway
extends AbstractGateway
in package
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.
Table of Contents
Properties
- $client : StripeClient
- $payment_controller : WC_Stripe_Payment_Intent
- $assets : AssetsApi
- $payment_method_id : string
- $payment_method_type : mixed
Methods
- __construct() : mixed
- __get() : mixed
- Used to retrieve deprecated properties.
- banner_checkout_enabled() : bool
- Return true if checkout page banner is enabled for this gateway
- cart_checkout_enabled() : bool
- Return true if cart page checkout is enabled for this gateway
- enqueue_add_payment_method_scripts() : mixed
- Enqueue scripts needed by the gateway on the add payment method page.
- 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.
- get_add_payment_method_script_handles() : mixed
- get_cart_script_handles() : array<string|int, mixed>
- get_checkout_script_handles() : array<string|int, mixed>
- get_express_checkout_script_handles() : array<string|int, mixed>
- get_formatted_shipping_method() : array<string|int, mixed>|void
- get_method_formats() : mixed
- get_mini_cart_dependencies() : mixed
- get_minicart_script_handles() : array<string|int, 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_payment_method_data() : array<string|int, mixed>
- 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_product_script_handles() : array<string|int, 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_tokens() : mixed
- init_supports() : mixed
- initialize() : mixed
- is_cart_section_enabled() : mixed
- is_express_checkout_enabled() : 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
- process_pre_order() : array<string|int, mixed>
- process_pre_order_payment() : mixed
- 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
- saved_payment_methods() : mixed
- scheduled_subscription_payment() : mixed
- set_new_source_token() : mixed
- set_payment_method_id() : void
- should_use_saved_payment_method() : bool
- Returns true if the customer is using a saved payment method in the request.
- subscription_payment_meta() : mixed
- update_failing_payment_method() : mixed
- use_saved_source() : mixed
- Return true of the customer is using a saved payment method.
- get_display_item_for_cart() : array<string|int, mixed>
- get_display_item_for_order() : mixed
- get_display_item_for_product() : array<string|int, mixed>
- 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
$client
public
StripeClient
$client
$payment_controller
public
WC_Stripe_Payment_Intent
$payment_controller
$assets
protected
AssetsApi
$assets
$payment_method_id
protected
string
$payment_method_id
$payment_method_type
protected
mixed
$payment_method_type
Methods
__construct()
public
__construct(WC_Stripe_Payment_Intent $payment_controller, StripeClient $client, AssetsApi $assets) : mixed
Parameters
- $payment_controller : WC_Stripe_Payment_Intent
- $client : StripeClient
- $assets : AssetsApi
__get()
Used to retrieve deprecated properties.
public
__get(mixed $key) : mixed
Parameters
- $key : mixed
banner_checkout_enabled()
Return true if checkout page banner is enabled for this gateway
public
banner_checkout_enabled() : bool
Return values
boolcart_checkout_enabled()
Return true if cart page checkout is enabled for this gateway
public
cart_checkout_enabled() : bool
Return values
boolenqueue_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_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
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>
Tags
Return values
array<string|int, mixed>get_checkout_script_handles()
public
get_checkout_script_handles() : array<string|int, mixed>
Tags
Return values
array<string|int, mixed>get_express_checkout_script_handles()
public
get_express_checkout_script_handles() : array<string|int, mixed>
Tags
Return values
array<string|int, mixed>get_formatted_shipping_method()
public
get_formatted_shipping_method(mixed $price, mixed $rate, mixed $i, mixed $package, mixed $incl_tax) : array<string|int, mixed>|void
Parameters
- $price : mixed
- $rate : mixed
- $i : mixed
- $package : mixed
- $incl_tax : mixed
Return values
array<string|int, mixed>|voidget_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>
Tags
Return values
array<string|int, 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_payment_method_data()
public
get_payment_method_data() : array<string|int, mixed>
Tags
Return values
array<string|int, mixed>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_product_script_handles()
public
get_product_script_handles() : array<string|int, mixed>
Tags
Return values
array<string|int, 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_tokens()
public
get_tokens() : mixed
init_supports()
public
init_supports() : mixed
initialize()
public
initialize() : mixed
is_cart_section_enabled()
public
is_cart_section_enabled() : mixed
is_express_checkout_enabled()
public
is_express_checkout_enabled() : mixed
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
boolprocess_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_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
boolsaved_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_payment_method_id()
public
set_payment_method_id(mixed $value) : void
Parameters
- $value : mixed
should_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
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
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
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>order_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