Questions tagged [woocommerce-bookings]

To be used for Woocommerce Bookings plugin related questions

Third party official Woocommerce Bookings plugin.

This powerful extension allows you to sell time or date-based bookings, adding a new product type to your WooCommerce site. Perfect for those wanting to offer appointments, services or rentals.

169 questions
2
votes
1 answer

Retrieving a woocommerce parent order on purchase?

hoping someone can help with this. It seems like a simple problem but wondering if there's a cleaner way to do it. Right now I have a hook that runs whenever a WooCommerce order is completed and when a order is updated. That hook is the…
sylargaf
  • 346
  • 1
  • 6
  • 19
2
votes
1 answer

Retrieve filled in Add-on data from booking/product

I'm writing a plugin to intercept the creation of bookings in wordpress. To have all the booking information I need to access the information filled in the addon fields (Woocommerce Product Add-Ons plugin) of a bookable product. The hooks I…
2
votes
1 answer

Programmatically adding a WC Booking in the cart fails

I am facing a problem to add such a product to the cart. I manage to create the booking with: $new_booking = get_wc_booking ($new_booking_data); $new_booking -> create ($status); But then I tried to apply these different methods without…
2
votes
1 answer

Uncaught Error: Call to a member function get_shipping_packages()

I am trying to get the current shipping zone of the user but I am getting an error every time I am trying to get it // The package. // Get cart shipping packages $shipping_packages = $woocommerce->cart->get_shipping_packages(); // Get the…
2
votes
1 answer

Custom email subject placeholders for WooCommerce order related bookings

Woocommerce gives the option to add placeholders to the subject of an email. I'd like to expand on that ability by creating a custom placeholder that pulls information from woocommerce gravity forms product addons and woocommerce bookings. I've…
Exodus
  • 23
  • 3
2
votes
1 answer

What hook to be used for cancelled booking in WooCommerce Bookings?

I'm trying to make an SQL query to run upon cancellation of a booking, via a custom plugin, updating custom user meta data. Here's my code: function wporg_callback() { global $wpdb; $wpdb->query("UPDATE usermeta SET meta_value = 15 WHERE…
2
votes
1 answer

Replace WooCommerce Cart Qty by persons count for Bookable Products

I am using the following code to update the Cart page for Qty with Persons for Booking Products: // Add "Persons" to replace cart quantity for bookable products add_filter( 'woocommerce_cart_item_quantity', 'replace_cart_quantity_for_bookings', 20,…
2
votes
1 answer

WooCommerce 4.0 custom checkout & ACF field value on email, admin order, and thank you page

I'm having a hard time printing my custom field value to the email notifications, order admin and thank you page. I've browsed through StackOverflow, tried every single answer I found but unfortunately not working and I couldn't figure out the…
2
votes
1 answer

WooCommerce Bookings: Echo booking time and date in confirmation email

I am wanting to customize the customer-completed-order.php template in WooCommerce Bookings and would like to add a line like the following. Your session will take place on May 11, 2020, 7:00 pm in timezone: Asia/Tokyo. If this time is incorrect…
James Weber
  • 281
  • 1
  • 3
  • 7
2
votes
1 answer

WooCommerce Bookings: Triggering AJAX Recalculation of Booking Cost on Product Page

I've added a couple new fields to the date-picker.php template in WooCommerce Bookings and need to trigger the AJAX recalculation of the booking cost on the product page when these fields are updated. Currently this recalculation is triggered when…
christian
  • 2,279
  • 4
  • 31
  • 42
2
votes
1 answer

Adding availabilities programmatically to a bookable product on Woocommerce Bookings

I have a form on a website that allows users to create bookable products. However, I can't find how to create a availability interval using Woocommerce php functions. Does anyone have an idea? Here's how I create my product $post_id =…
Pierre-Alexis
  • 153
  • 1
  • 8
2
votes
1 answer

Can't target elements within jQuery datepicker

I am having trouble targeting elements within jQuery ui-datepicker with the plugin WooCommerce Bookings. Every time I target it using JavaScript it returns null, so the EventListener can't be executed. However, if I target anything outside the…
2
votes
1 answer

wc_get_products not returning bookable products

First time trying to use Woocommerce booking to build a page. I was changing the products to be bookable and they started to disappear from my custom loop using wc_get_products. Product category, everything else is not changed. It is not getting…
2
votes
1 answer

WooCommerce Bookings: adding and reordering item data in cart and checkout

I want to display the end date of the booking as well as the start date. Now so far I have the following: add_filter( 'woocommerce_get_item_data', 'display_booking_date', 10, 2 ); function display_booking_date( $item_data, $cart_item ){ if ( !…
DigM
  • 509
  • 1
  • 4
  • 24
2
votes
0 answers

JQuery / WooCommerce Bookings - Wrong dimensions for hidden elements

I use WooCommerce Bookings and just placed the Calendar View from the top into one of the WooCommerce Tabs. As this tab has display:none; when the visitor hits the website, the jQuery plugin does not calculate the dimensions of the days correctly. I…
Torben
  • 5,388
  • 12
  • 46
  • 78
1
2
3
11 12