Skip to content

Instantly share code, notes, and snippets.

@vishalck
Created May 23, 2017 11:25
Show Gist options
  • Save vishalck/5030257f86f04ecfd5bda30f549dacce to your computer and use it in GitHub Desktop.
Save vishalck/5030257f86f04ecfd5bda30f549dacce to your computer and use it in GitHub Desktop.
Failed purchase file when creating custom Thank You page for WooCommerce
<p><?php _e( 'There was a problem processing your order. Your transaction has been declined.', 'woocommerce' ); ?></p>
<p>
<?php
_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( 'Try Again', '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