Advertisement
Guest User

Untitled

a guest
Oct 18th, 2019
123
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.48 KB | None | 0 0
  1. <?php
  2. /**
  3. * Adding the payment fragment to the WC order review AJAX response
  4. */
  5. add_filter( 'woocommerce_update_order_review_fragments', 'my_custom_payment_fragment' );
  6.  
  7. /**
  8. * Adding our payment gateways to the fragment #checkout_payments so that this HTML is replaced with the updated one.
  9. */
  10. function my_custom_payment_fragment( $fragments ) {
  11. ob_start();
  12.  
  13. my_custom_display_payments();
  14.  
  15. $html = ob_get_clean();
  16.  
  17. $fragments['#checkout_payments'] = $html;
  18.  
  19. return $fragments;
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement