woocommerce_before_variations_form

woocommerce_before_variations_form

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

See hook in core

Displaying hooks found in version: woocommerce.8.7.0

do_action('woocommerce_before_variations_form') is found 1 times:

  • /templates/single-product/add-to-cart/variable.php line 29
     
    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>