AbstractLegacyGateway extends AbstractGateway
in package

AbstractYes

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

Methods

banner_checkout_enabled()

Return true if checkout page banner is enabled for this gateway

public banner_checkout_enabled() : bool
Return values
bool

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 = ''

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>|void

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
since
3.1.8

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.

mini_cart_enabled()

Return true if mini-cart checkout is enabled for this gateway

public mini_cart_enabled() : bool
Tags
since
3.1.8
Return values
bool

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_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
bool

scheduled_subscription_payment()

public scheduled_subscription_payment(float $amount, WC_Order $order) : mixed
Parameters
$amount : float
$order : WC_Order

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
bool

subscription_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

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
since
3.2.1
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
since
3.2.1
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
bool

process_change_payment_method_request()

protected process_change_payment_method_request(WC_Subscription $subscription) : array<string|int, mixed>
Parameters
$subscription : WC_Subscription
Tags
since
3.2.13
Return values
array<string|int, mixed>

        
On this page

Search results