/**
* Theme Name: Bookory Child
* Description: This is a child theme of Bookory, generated by Merlin WP.
* Author: <a href="https://pavothemes.com/">PavoThemes</a>
* Template: bookory
* Version: 2.3.1
*/
add_shortcode('variation_attributes', function () {
    global $product;

    if (!$product || !$product->is_type('variable')) return '';

    ob_start();
    foreach ($product->get_variation_attributes() as $attribute => $options) {
        woocommerce_dropdown_variation_attribute_options([
            'options' => $options,
            'attribute' => $attribute,
            'product' => $product,
        ]);
    }
    return ob_get_clean();
});