Simple wordpress php code

Job ID: 31598995

Budget: ₹600 – ₹1,500 INR

Hello, I have a website(link to be shared in DM)
I need to add a simple validation code on woocommere checkout page.
I have a field which is using an appointment calendar. This field needs be compulsory before Place Order button can be pressed. I am using a plugin called WooCommerce Checkout Field Editor(paid plugin), the appointment plugin is Wappointment(Paid).
need to add a validation rule if the customer books an appointment only then can be place an order for other item.
I have a piece a code.

add_action('woocommerce_checkout_process', 'misha_check_if_selected');

function misha_check_if_selected() {

// you can add any custom validations here
if ( empty( $_POST['paragraph-7259099911'] ) )
wc_add_notice( 'Please book your appointment', 'error' );

}
Related categories: PHP JavaScript WordPress HTML WooCommerce