Woocommerce PHP Snippet for Booknetic

Job ID: 39109244

Budget: €50 – €70 EUR

For our WooCommerce website, we are looking for a fluent English-speaking developer who is highly skilled in PHP and WooCommerce/WordPress.

Currently, we use Booknetic to manage our appointments. When customers book an appointment, Booknetic creates a WooCommerce customer in the background but does not generate a WooCommerce order.

We want to maintain the existing Booknetic flow, but when the admin confirms the reserved appointment (status changes to "approved"), a WooCommerce order should also be created, linked to the customer that Booknetic has generated in WordPress.

The WooCommerce order should include the following details to ensure the standard WooCommerce invoicing flow remains intact:
- Appointment category
- Appointment extras
- Number of extras
- Appointment date/time
- Payment method and whether the appointment has already been paid

This new WooCommerce order should have the status "On Hold." The order creation must occur after all Booknetic actions are completed to avoid conflicts.
If the appointment has a value of 0€ it obviously should not create a WooCommerce Order.

We expect the implementation to be written in correct PHP code, object-oriented, and developed as a custom plugin or within functions.php. Of course, we will review and test the code before processing the payment.

The deadline is one week. The developer should provide a staging environment (or request a demo from Booknetic).

### Tips for the developer:
https://rudrastyh.com/woocommerce/create-orders-programmatically.html
We’ve got a virtual product available to book the order on.
Check screenshot for given trigger
Related categories: PHP WooCommerce