WooCommerce Code Reference

WC_Gateway_Paypal_Helper
in package

Helper for PayPal gateway.

Table of Contents

get_wc_order_from_paypal_custom_id()  : WC_Order|null
Get the WC order from the PayPal custom ID.
is_orders_v2_migration_eligible()  : bool
Check if the merchant is eligible for migration from WPS to PPCP.
is_paypal_gateway_available()  : bool
Check if the PayPal gateway is enabled.
mask_email()  : string
Mask email address before @ keeping the full domain.
redact_data()  : mixed
Remove PII (Personally Identifiable Information) from data for logging.

Methods

redact_data()

Remove PII (Personally Identifiable Information) from data for logging.

public static redact_data(mixed $data) : mixed

This function recursively traverses the data array and redacts sensitive information while preserving the structure for debugging purposes.

Parameters
$data : mixed

The data to remove PII from (array, string, or other types).

Return values
mixedThe data with PII redacted.