Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save webdados/f1445f64e16ddbd1cbfe963f4f920238 to your computer and use it in GitHub Desktop.
Save webdados/f1445f64e16ddbd1cbfe963f4f920238 to your computer and use it in GitHub Desktop.
multibanco_ifthen_thankyou_instructions_table_html filter example
<?php
// Multibanco IfThen - Thank you page payment instructions filter
add_filter( 'multibanco_ifthen_thankyou_instructions_table_html', 'my_multibanco_ifthen_thankyou_instructions_table_html', 1, 5 );
function my_multibanco_ifthen_thankyou_instructions_table_html( $html, $ent, $ref, $order_total, $order_id ) {
ob_start();
?>
<h2>Multibanco payment instructions for Order #<?php echo $order_id; ?></h2>
<p>
<b>Entity:</b> <?php echo $ent; ?>
<br/>
<b>Reference:</b> <?php echo WC_IfthenPay_Webdados()->format_multibanco_ref( $ref ); ?>
<br/>
<b>Value:</b> <?php echo $order_total; ?>
</p>
<p><?php
//Without WPML
echo WC_IfthenPay_Webdados()->multibanco_settings['extra_instructions'];
?></p>
<?php
return ob_get_clean();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment