_order->update_status( 'failed', __( 'Could not get the payment authorization.', 'woocommerce-paypal-payments' ) ); throw new RuntimeException( __( 'Payment provider declined the payment, please use a different payment method.', 'woocommerce-paypal-payments' ) ); } } /** * Adds the order note with status details. * * @param WC_Order $wc_order The WC order to which the note will be added. * @param string $status The status name. * @param string $reason The status reason. */ protected function add_status_details_note( WC_Order $wc_order, string $status, string $reason ): void { $wc_order->add_order_note( sprintf( /* translators: %1$s - PENDING, DENIED, ... %2$s - text explaining the reason, ... */ __( 'PayPal order payment is set to %1$s status, details: %2$s', 'woocommerce-paypal-payments' ), $status, $reason ) ); $wc_order->save(); } }
Fatal error: Trait "WooCommerce\PayPalCommerce\WcGateway\Processor\PaymentsStatusHandlingTrait" not found in /htdocs/wp-content/plugins/woocommerce-paypal-payments/modules/ppcp-wc-gateway/src/Processor/AuthorizedPaymentsProcessor.php on line 34