Hello, the calendar is displayed on the woocommerce_before_add_to_cart_button hook. It must be display in the woocommerce .cart form (<form class="cart ...>
). So you would probably need to move the whole form with custom code. If it can help, that’s excatly what the Booking Activities > Settings > WooCommerce tab > “Booking form location on product pages” option does (it moves the whole form below the product summary instead of inside of it), here is its code.
Hi, thank you for your suggestions.
No, I would like to display the calendar even below, after the other Tabs (Descriptions and Reviews)
If I understand correctly, you would like to display in order:
– the product summary
– then the quantity field and the Add to cart button
– then the tabs
– then the calendar ?
Here is a code example, in the hope to help,
remove_action( 'woocommerce_after_single_product_summary', 'woocommerce_output_product_data_tabs', 10 );
remove_action( 'woocommerce_before_add_to_cart_button', 'bookacti_add_booking_system_in_single_product_page', 20 );
add_action( 'woocommerce_after_add_to_cart_button', 'woocommerce_output_product_data_tabs', 20 );
add_action( 'woocommerce_after_add_to_cart_button', 'bookacti_add_booking_system_in_single_product_page', 20 );
with Booking Activities > Settings > WooCommerce tab > “Booking form location on product pages” = Full width
And here is a code example to display
– the product summary
– then the tabs
– then the calendar
– then the quantity field and the Add to cart button
remove_action( 'woocommerce_after_single_product_summary', 'woocommerce_output_product_data_tabs', 10 );
add_action( 'woocommerce_after_single_product_summary', 'woocommerce_output_product_data_tabs', 4 );
with Booking Activities > Settings > WooCommerce tab > “Booking form location on product pages” = Full width
-
This reply was modified 2 years, 6 months ago by yoancutillas. Reason: Error in first code