Display error message when order is not created, do not handle place order button display when acdc is not enabled

This commit is contained in:
dinamiko 2021-04-20 14:27:37 +02:00
parent 61aa53c188
commit 7f553087c6
2 changed files with 11 additions and 1 deletions

View file

@ -231,7 +231,11 @@ class OrderEndpoint {
$response = $this->request( $url, $args );
if ( is_wp_error( $response ) ) {
$error = new RuntimeException(
__( 'Could not create order.', 'woocommerce-paypal-payments' )
sprintf(
// translators: %s is the error message.
__( 'Could not create order: %s', 'woocommerce-paypal-payments' ),
$response->get_error_message()
)
);
$this->logger->log(
'warning',