WC_Gateway_Paypal_Buttons
in package
Handles PayPal Buttons.
Tags
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
$buttons
The delegated buttons instance.
private
PayPalButtons
$buttons
Methods
__construct()
Constructor.
public
__construct(WC_Gateway_Paypal $gateway) : mixed
Parameters
- $gateway : WC_Gateway_Paypal
-
The gateway instance.
Return values
mixed —get_client_id()
Get the client-id for the PayPal buttons.
public
get_client_id() : string|null
Tags
Return values
string|null — The 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
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
Return values
string —get_options()
Get the options for the PayPal buttons.
public
get_options() : array<string|int, mixed>
Tags
Return values
array<string|int, mixed> —get_page_type()
Get the page type for the PayPal buttons.
public
get_page_type() : string
Tags
Return values
string —is_enabled()
Whether PayPal Buttons is enabled.
public
is_enabled() : bool
