Created
November 2, 2018 19:52
-
-
Save webdados/f1445f64e16ddbd1cbfe963f4f920238 to your computer and use it in GitHub Desktop.
multibanco_ifthen_thankyou_instructions_table_html filter example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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