mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-05 08:59:14 +08:00
Merge pull request #899 from woocommerce/PCP-878-fatal-error-caused-by-oxxo-code
Fix thankyou_order_received filter usage
This commit is contained in:
commit
74bc941699
1 changed files with 10 additions and 1 deletions
|
@ -80,7 +80,16 @@ class OXXO {
|
|||
|
||||
add_filter(
|
||||
'woocommerce_thankyou_order_received_text',
|
||||
function( string $message, WC_Order $order ) {
|
||||
/**
|
||||
* Order can be null.
|
||||
*
|
||||
* @psalm-suppress MissingClosureParamType
|
||||
*/
|
||||
function( string $message, $order ) {
|
||||
if ( ! $order instanceof WC_Order ) {
|
||||
return $message;
|
||||
}
|
||||
|
||||
$payer_action = $order->get_meta( 'ppcp_oxxo_payer_action' ) ?? '';
|
||||
|
||||
$button = '';
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue