woocommerce_before_add_to_cart_button

woocommerce_before_add_to_cart_button

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

See hook in core

Displaying hooks found in version: woocommerce.8.7.0

do_action('woocommerce_before_add_to_cart_button') is found 4 times:

  • /templates/single-product/add-to-cart/external.php line 23
     
    do_action( 'woocommerce_before_add_to_cart_form' ); ?>
    
    <form class="cart" action="<?php echo esc_url( $product_url ); ?>" method="get">
    	<?php do_action( 'woocommerce_before_add_to_cart_button' ); ?>
    
    	<button type="submit" class="single_add_to_cart_button button alt<?php echo esc_attr( wc_wp_theme_get_element_class_name( 'button' ) ? ' ' . wc_wp_theme_get_element_class_name( 'button' ) : '' ); ?>"><?php echo esc_html( $button_text ); ?></button>
    
    	<?php wc_query_string_form_fields( $product_url ); ?>
    
    	<?php do_action( 'woocommerce_after_add_to_cart_button' ); ?>
    
  • /templates/single-product/add-to-cart/grouped.php line 118
    	<input type="hidden" name="add-to-cart" value="<?php echo esc_attr( $product->get_id() ); ?>" />
    
    	<?php if ( $quantites_required && $show_add_to_cart_button ) : ?>
    
    		<?php do_action( 'woocommerce_before_add_to_cart_button' ); ?>
    
    		<button type="submit" class="single_add_to_cart_button button alt<?php echo esc_attr( wc_wp_theme_get_element_class_name( 'button' ) ? ' ' . wc_wp_theme_get_element_class_name( 'button' ) : '' ); ?>"><?php echo esc_html( $product->single_add_to_cart_text() ); ?></button>
    
    		<?php do_action( 'woocommerce_after_add_to_cart_button' ); ?>
    
    	<?php endif; ?>
    
  • /templates/single-product/add-to-cart/simple.php line 33

    Share this:

  • /templates/single-product/add-to-cart/variation-add-to-cart-button.php line 15

    global $product;
    ?>