WooCommerce Code Reference

WC_Gateway_Paypal_Buttons
in package

Handles PayPal Buttons.

Tags
deprecated
10.5.0

Use Automattic\WooCommerce\Gateways\PayPal\Buttons instead. This class will be removed in 11.0.0.

Table of Contents

$buttons  : PayPalButtons
The delegated buttons instance.
__construct()  : mixed
Constructor.
get_client_id()  : string|null
Get the client-id for the PayPal buttons.
get_common_options()  : array<string|int, mixed>
Get the common attributes for the PayPal JS SDK script and modules.
get_current_page_for_app_switch()  : string
Get the current page URL, to be used for App Switch.
get_options()  : array<string|int, mixed>
Get the options for the PayPal buttons.
get_page_type()  : string
Get the page type for the PayPal buttons.
is_enabled()  : bool
Whether PayPal Buttons is enabled.

Properties

Methods

get_client_id()

Get the client-id for the PayPal buttons.

public get_client_id() : string|null
Tags
deprecated
10.5.0

Use Automattic\WooCommerce\Gateways\PayPal\Buttons::get_client_id() instead. This method will be removed in 11.0.0.

Return values
string|nullThe PayPal client-id, or null if the request fails.

get_common_options()

Get the common attributes for the PayPal JS SDK script and modules.

public get_common_options() : array<string|int, mixed>
Tags
deprecated
10.5.0

Use Automattic\WooCommerce\Gateways\PayPal\Buttons::get_common_options() instead. This method will be removed in 11.0.0.

Return values
array<string|int, mixed>

get_current_page_for_app_switch()

Get the current page URL, to be used for App Switch.

public get_current_page_for_app_switch() : string

Limited to checkout, cart, and product pages for security.

Tags
deprecated
10.5.0

Use Automattic\WooCommerce\Gateways\PayPal\Buttons::get_current_page_for_app_switch() instead. This method will be removed in 11.0.0.

Return values
string

get_options()

Get the options for the PayPal buttons.

public get_options() : array<string|int, mixed>
Tags
deprecated
10.5.0

Use Automattic\WooCommerce\Gateways\PayPal\Buttons::get_options() instead. This method will be removed in 11.0.0.

Return values
array<string|int, mixed>

get_page_type()

Get the page type for the PayPal buttons.

public get_page_type() : string
Tags
deprecated
10.5.0

Use Automattic\WooCommerce\Gateways\PayPal\Buttons::get_page_type() instead. This method will be removed in 11.0.0.

Return values
string

is_enabled()

Whether PayPal Buttons is enabled.

public is_enabled() : bool
Tags
deprecated
10.5.0

Use Automattic\WooCommerce\Gateways\PayPal\Buttons::is_enabled() instead. This method will be removed in 11.0.0.

Return values
bool