woocommerce_before_variations_form

woocommerce_before_variations_form

Appears in: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
Hook Type: action

See hook in core

Displaying hooks found in version: woocommerce.9.8.1

do_action('woocommerce_before_variations_form') is found 2 times:

  • /src/Blocks/BlockTypes/AddToCartWithOptions.php line 152
    148
    149
    150
    151
    152
    153
    154
    155
    156
    157
    158
         * Hook: woocommerce_before_variations_form.
         *
         * @since 2.4.0
         */
        do_action( 'woocommerce_before_variations_form' );
    }
    $hooks_before = ob_get_clean();
     
    ob_start();
    if ( ProductType::SIMPLE === $product_type ) {
        /**
  • /templates/single-product/add-to-cart/variable.php line 29
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    do_action( 'woocommerce_before_add_to_cart_form' ); ?>
     
    <form class="variations_form cart" action="<?php echo esc_url( apply_filters( 'woocommerce_add_to_cart_form_action', $product->get_permalink() ) ); ?>" method="post" enctype='multipart/form-data' data-product_id="<?php echo absint( $product->get_id() ); ?>" data-product_variations="<?php echo $variations_attr; // WPCS: XSS ok. ?>">
        <?php do_action( 'woocommerce_before_variations_form' ); ?>
     
        <?php if ( empty( $available_variations ) && false !== $available_variations ) : ?>
            <p class="stock out-of-stock"><?php echo esc_html( apply_filters( 'woocommerce_out_of_stock_message', __( 'This product is currently out of stock and unavailable.', 'woocommerce' ) ) ); ?></p>
        <?php else : ?>
            <table class="variations" cellspacing="0" role="presentation">
                <tbody>