Created
July 12, 2021 13:09
-
-
Save Sirvijver/51639c36e220e631c96464a0e2ecb380 to your computer and use it in GitHub Desktop.
Remove WooCommerce "Place Order" button
This file contains hidden or 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
| add_filter('woocommerce_order_button_html', 'remove_order_button_html' ); | |
| function remove_order_button_html( $button ) { | |
| class | |
| foreach( WC()->cart->get_cart() as $cart_item ) { | |
| if( $cart_item['data']-> { | |
| $found = true; | |
| break; // We stop the loop | |
| } | |
| } | |
| if( $found ) | |
| $button = ''; | |
| return $button; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment