Created
August 24, 2022 22:48
-
-
Save InpsydeNiklas/14c1b788301f8ffbaad4e37ca9092ed3 to your computer and use it in GitHub Desktop.
disable PayPal Payments smart buttons on single product page for WooCommerce Bookings product
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
| <?php | |
| // removes PayPal smart buttons on single product page for bookable type products from WooCommerce Bookings plugin | |
| function ppcp_remove_single_product_buttons( $enable_button, $product ){ | |
| if ( $product->is_type( 'booking' ) ) { | |
| $enable_button = false; | |
| } | |
| return $enable_button; | |
| } | |
| add_action( 'woocommerce_paypal_payments_product_supports_payment_request_button', 'ppcp_remove_single_product_buttons', 10, 2 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment