Advertisement
Guest User

Untitled

a guest
Aug 24th, 2019
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.65 KB | None | 0 0
  1. /**
  2. * Class WFOB_Compatibility_With_WC_Checkout_addons By Skyverge
  3. */
  4. class WFOB_Compatibility_With_WC_Checkout_addons_Temp {
  5.  
  6. public function __construct() {
  7. add_action( 'wfob_order_bump_fragments', [ $this, 'remove_add_on_fragments' ] );
  8. }
  9.  
  10. public function remove_add_on_fragments() {
  11. add_filter( 'woocommerce_update_order_review_fragments', [ $this, 'remove_fragments_from_bump_calls' ], 999 );
  12. }
  13.  
  14. public function remove_fragments_from_bump_calls( $fragments ) {
  15. if ( isset( $fragments['#wc_checkout_add_ons'] ) ) {
  16. unset( $fragments['#wc_checkout_add_ons'] );
  17. }
  18.  
  19. return $fragments;
  20. }
  21. }
  22.  
  23. new WFOB_Compatibility_With_WC_Checkout_addons_Temp();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement