mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-06 12:25:15 +08:00
Merge branch 'trunk' into PCP-951-could-not-retrieve-order
This commit is contained in:
commit
c654786ee3
11 changed files with 66 additions and 37 deletions
|
@ -168,7 +168,7 @@ return array(
|
|||
CreditCardGateway::ID,
|
||||
PayUponInvoiceGateway::ID,
|
||||
CardButtonGateway::ID,
|
||||
OXXOGateway::ID .
|
||||
OXXOGateway::ID,
|
||||
Settings::PAY_LATER_TAB_ID,
|
||||
),
|
||||
true
|
||||
|
|
|
@ -81,12 +81,12 @@ class OXXO {
|
|||
add_filter(
|
||||
'woocommerce_thankyou_order_received_text',
|
||||
/**
|
||||
* Order can be null.
|
||||
* Param types removed to avoid third-party issues.
|
||||
*
|
||||
* @psalm-suppress MissingClosureParamType
|
||||
*/
|
||||
function( string $message, $order ) {
|
||||
if ( ! $order instanceof WC_Order ) {
|
||||
function( $message, $order ) {
|
||||
if ( ! is_string( $message ) || ! $order instanceof WC_Order ) {
|
||||
return $message;
|
||||
}
|
||||
|
||||
|
@ -105,7 +105,16 @@ class OXXO {
|
|||
|
||||
add_action(
|
||||
'woocommerce_email_before_order_table',
|
||||
function ( WC_Order $order, bool $sent_to_admin ) {
|
||||
/**
|
||||
* Param types removed to avoid third-party issues.
|
||||
*
|
||||
* @psalm-suppress MissingClosureParamType
|
||||
*/
|
||||
function ( $order, $sent_to_admin ) {
|
||||
if ( ! is_a( $order, WC_Order::class ) || ! is_bool( $sent_to_admin ) ) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (
|
||||
! $sent_to_admin
|
||||
&& $order->get_payment_method() === OXXOGateway::ID
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue