Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /**
- * Adding the payment fragment to the WC order review AJAX response
- */
- add_filter( 'woocommerce_update_order_review_fragments', 'my_custom_payment_fragment' );
- /**
- * Adding our payment gateways to the fragment #checkout_payments so that this HTML is replaced with the updated one.
- */
- function my_custom_payment_fragment( $fragments ) {
- ob_start();
- my_custom_display_payments();
- $html = ob_get_clean();
- $fragments['#checkout_payments'] = $html;
- return $fragments;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement