woocommerce_before_add_to_cart_form хук-событиеWC 1.0

External product add to cart

This template can be overridden by copying it to yourtheme/woocommerce/single-product/add-to-cart/external.php.

HOWEVER, on occasion WooCommerce will need to update template files and you (the theme developer) will need to copy the new files to your theme to maintain compatibility. We try to do this as little as possible, but it does happen. When this occurs the version of the template file will be bumped and the readme will list any important changes.


add_action( 'woocommerce_before_add_to_cart_form', 'wp_kama_woocommerce_before_add_to_cart_form_action' );

 * Function for `woocommerce_before_add_to_cart_form` action-hook.
 * @return void
function wp_kama_woocommerce_before_add_to_cart_form_action(){

	// action...

Где вызывается хук

В файле: /templates/single-product/add-to-cart/external.php
woocommerce/templates/single-product/add-to-cart/external.php 20
do_action( 'woocommerce_before_add_to_cart_form' ); ?>
woocommerce/templates/single-product/add-to-cart/simple.php 30
<?php do_action( 'woocommerce_before_add_to_cart_form' ); ?>
woocommerce/templates/single-product/add-to-cart/grouped.php 22
do_action( 'woocommerce_before_add_to_cart_form' ); ?>
woocommerce/templates/single-product/add-to-cart/variable.php 26
do_action( 'woocommerce_before_add_to_cart_form' ); ?>

Где используется хук в WooCommerce

Использование не найдено.