WooCommerce Code Reference

WC_Gateway_Paypal_Notices
in package

Class WC_Gateway_Paypal_Notices.

Tags
deprecated
10.5.0

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

since
10.3.0

Table of Contents

$notices  : PayPalNotices
The delegated notices instance.
__construct()  : mixed
Constructor.
add_paypal_migration_notice()  : void
Add notice warning about the migration to PayPal Payments.
add_paypal_migration_notice_on_payments_settings_page()  : void
Add notice warning about the migration to PayPal Payments on the Payments settings page.
add_paypal_notices()  : void
Add PayPal Standard notices.
add_paypal_notices_on_payments_settings_page()  : void
Add PayPal notices on the payments settings page.
clear_account_restriction_flag()  : void
Clear the flag indicating PayPal account restriction.
manage_account_restriction_flag_for_notice()  : void
Handle PayPal order response to manage account restriction notices.
set_account_restriction_flag()  : void
Set the flag indicating PayPal account restriction.
paypal_migration_notice_dismissed()  : bool
Check if the installation notice has been dismissed.

Properties

Methods

add_paypal_migration_notice()

Add notice warning about the migration to PayPal Payments.

public add_paypal_migration_notice() : void
Tags
deprecated
10.5.0

Use Automattic\WooCommerce\Gateways\PayPal\Notices::add_paypal_migration_notice() instead.

since
10.3.0
Return values
void

add_paypal_migration_notice_on_payments_settings_page()

Add notice warning about the migration to PayPal Payments on the Payments settings page.

public add_paypal_migration_notice_on_payments_settings_page() : void
Tags
deprecated
10.4.0

No longer used. Functionality is now handled by add_paypal_notices_on_payments_settings_page().

Return values
void

add_paypal_notices_on_payments_settings_page()

Add PayPal notices on the payments settings page.

public add_paypal_notices_on_payments_settings_page() : void
Tags
deprecated
10.5.0

Use Automattic\WooCommerce\Gateways\PayPal\Notices::add_paypal_notices_on_payments_settings_page() instead.

since
10.4.0
Return values
void

clear_account_restriction_flag()

Clear the flag indicating PayPal account restriction.

public static clear_account_restriction_flag() : void
Tags
deprecated
10.5.0

Use Automattic\WooCommerce\Gateways\PayPal\Notices::clear_account_restriction_flag() instead.

since
10.4.0
Return values
void

manage_account_restriction_flag_for_notice()

Handle PayPal order response to manage account restriction notices.

public static manage_account_restriction_flag_for_notice(int|string $http_code, array<string|int, mixed> $response_data, WC_Order $order) : void
Parameters
$http_code : int|string

The HTTP status code from the PayPal API response.

$response_data : array<string|int, mixed>

The decoded response data from the PayPal API.

$order : WC_Order

The WooCommerce order object.

Tags
deprecated
10.5.0

Use Automattic\WooCommerce\Gateways\PayPal\Notices::manage_account_restriction_flag_for_notice() instead.

since
10.4.0
Return values
void

set_account_restriction_flag()

Set the flag indicating PayPal account restriction.

public static set_account_restriction_flag() : void
Tags
deprecated
10.5.0

Use Automattic\WooCommerce\Gateways\PayPal\Notices::set_account_restriction_flag() instead.

since
10.4.0
Return values
void