Skip to content

Instantly share code, notes, and snippets.

@woogist
Created January 21, 2015 15:38
Show Gist options
  • Save woogist/e5e9341d24436d59fc0d to your computer and use it in GitHub Desktop.
Save woogist/e5e9341d24436d59fc0d to your computer and use it in GitHub Desktop.
Shows a message to the customer when the purchase fails
<p><?php _e( 'Unfortunately your order cannot be processed as the originating bank/merchant has declined your transaction.', 'woocommerce' ); ?></p>
<p><?php
if ( is_user_logged_in() )
_e( 'Please attempt your purchase again or go to your account page.', 'woocommerce' );
else
_e( 'Please attempt your purchase again.', 'woocommerce' );
?></p>
<p>
<a href="<?php echo esc_url( $order->get_checkout_payment_url() ); ?>" class="button pay"><?php _e( 'Pay', 'woocommerce' ) ?></a>
<?php if ( is_user_logged_in() ) : ?>
<a href="<?php echo esc_url( get_permalink( wc_get_page_id( 'myaccount' ) ) ); ?>" class="button pay"><?php _e( 'My Account', 'woocommerce' ); ?></a>
<?php endif; ?>
</p>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment