Skip to content

Instantly share code, notes, and snippets.

@pablo-sg-pacheco
Created August 23, 2016 13:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pablo-sg-pacheco/2fcd29033b40c6e7ce74b74bc3673b47 to your computer and use it in GitHub Desktop.
Save pablo-sg-pacheco/2fcd29033b40c6e7ce74b74bc3673b47 to your computer and use it in GitHub Desktop.
Woocommerce - Adiciona as informacoes bancarias na pag do pedido
<?php
//Adiciona as informacoes bancarias na pag do pedido
add_action('woocommerce_view_order',function($order_id){
//echo '<hr style="border-top:1px solid #ccc;margin-top:10px;margin-bottom:30px" />';
$order=new WC_Order( $order_id );
if ( $order->payment_method !== 'bacs') return;
$bacs = new WC_Gateway_BACS();
$bacs->thankyou_page( $order_id);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment