Created
February 18, 2026 08:30
-
-
Save plugin-republic/be9d0af445644c8a205a45b0c7be555f to your computer and use it in GitHub Desktop.
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 | |
| /** | |
| * Subtract last day's cost from daily booking | |
| * Requires bookings to be a minimum of 2 days | |
| */ | |
| function demo_dont_charge_last_day( $booking_cost, $product_id ) { | |
| $std_cost = bfwc_get_standard_cost( $product_id ); | |
| $booking_cost = $booking_cost - $std_cost; | |
| return $booking_cost; | |
| } | |
| add_filter( 'bfwc_booking_cost', 'demo_dont_charge_last_day', 10, 2 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment