Визуальное Руководство WooCommerce:Hook Single Product Page

Это визуальное руководство  Wocommerce Hook -ов  призвано для того что бы Вы легко и быстро могли найти интересующие Вас Hook — и Woocommerce увидев их фактическое местоположение.  

Hook Single Product Page

Default Actions:

add_action( ‘woocommerce_before_single_product’, ‘wc_print_notices’, 10 );

Remove Default Actions:

remove_action( ‘woocommerce_before_single_product’, ‘wc_print_notices’, 10 );

Add Custom Action:

add_action( ‘woocommerce_before_single_product’, ‘my_custom_action’, 15 );

function my_custom_action() {
echo ‘TEST’;
}

Default Actions:
add_action( ‘woocommerce_before_single_product_summary’, ‘woocommerce_show_product_sale_flash’, 10 );

add_action( ‘woocommerce_before_single_product_summary’, ‘woocommerce_show_product_images’, 20 );

Remove Default Actions:
remove_action( ‘woocommerce_before_single_product_summary’, ‘woocommerce_show_product_sale_flash’, 10 );

remove_action( ‘woocommerce_before_single_product_summary’, ‘woocommerce_show_product_images’, 20 );

Add Custom Action:
add_action( ‘woocommerce_before_single_product_summary’, ‘my_custom_action’, 5 ); function my_custom_action() { echo ‘TEST’; }



Изображение


товара


Default Actions:
add_action( ‘woocommerce_before_single_product_summary’, ‘woocommerce_show_product_sale_flash’, 10 );

add_action( ‘woocommerce_before_single_product_summary’, ‘woocommerce_show_product_images’, 20 );

Remove Default Actions:
remove_action( ‘woocommerce_before_single_product_summary’, ‘woocommerce_show_product_sale_flash’, 10 );

remove_action( ‘woocommerce_before_single_product_summary’, ‘woocommerce_show_product_images’, 20 );

Add Custom Action:
add_action( ‘woocommerce_before_single_product_summary’, ‘my_custom_action’, 5 ); function my_custom_action() { echo ‘TEST’; }
Default Actions:
add_action( ‘woocommerce_single_product_summary’, ‘woocommerce_template_single_title’, 5 );
add_action( ‘woocommerce_single_product_summary’, ‘woocommerce_template_single_rating’, 10 );
add_action( ‘woocommerce_single_product_summary’, ‘woocommerce_template_single_price’, 10 );
add_action( ‘woocommerce_single_product_summary’, ‘woocommerce_template_single_excerpt’, 20 );
add_action( ‘woocommerce_single_product_summary’, ‘woocommerce_template_single_add_to_cart’, 30 );
add_action( ‘woocommerce_single_product_summary’, ‘woocommerce_template_single_meta’, 40 );
add_action( ‘woocommerce_single_product_summary’, ‘woocommerce_template_single_sharing’, 50 );

Remove Default Actions:

remove_action( ‘woocommerce_single_product_summary’, ‘woocommerce_template_single_title’, 5 );
remove_action( ‘woocommerce_single_product_summary’, ‘woocommerce_template_single_rating’, 10 );
remove_action( ‘woocommerce_single_product_summary’, ‘woocommerce_template_single_price’, 10 );
remove_action( ‘woocommerce_single_product_summary’, ‘woocommerce_template_single_excerpt’, 20 );
remove_action( ‘woocommerce_single_product_summary’, ‘woocommerce_template_single_add_to_cart’, 30 );
remove_action( ‘woocommerce_single_product_summary’, ‘woocommerce_template_single_meta’, 40 );
remove_action( ‘woocommerce_single_product_summary’, ‘woocommerce_template_single_sharing’, 50 );

Add Custom Action:

add_action( ‘woocommerce_single_product_summary’, ‘my_custom_action’, 60 ); function my_custom_action() { echo ‘TEST’; }
Заголовок продукта

Цена по распродаже

Короткое описание

Default Actions:

add_action( ‘woocommerce_before_add_to_cart_form’, ‘my_custom_action’, 5 );

function my_custom_action() { echo ‘TEST’; }
Default Actions:

add_action( ‘woocommerce_before_variations_form’, ‘my_custom_action’, 5 );

function my_custom_action() { echo ‘TEST’; }
Default Actions:

add_action( ‘woocommerce_single_variation’, ‘woocommerce_single_variation’, 10 );

add_action( ‘woocommerce_single_variation’, ‘woocommerce_single_variation_add_to_cart_button’, 20 );

Remove Default Actions:

remove_action( ‘woocommerce_single_variation’, ‘woocommerce_single_variation’, 10 );

remove_action( ‘woocommerce_single_variation’, ‘woocommerce_single_variation_add_to_cart_button’, 20 );

Add Custom Action:

add_action( ‘woocommerce_single_variation’, ‘my_custom_action’, 5 ); function my_custom_action() { echo ‘TEST’; }

Опции товара 

Default Actions:

add_action( ‘woocommerce_before_variations_form’, ‘my_custom_action’, 5 );

function my_custom_action() { echo ‘TEST’; }
Default Actions:

add_action( ‘woocommerce_before_variations_form’, ‘my_custom_action’, 5 );

function my_custom_action() { echo ‘TEST’; }

5000 руб 

Распродажа 

Количество и  кнопка «Добавить в карзину»

Add Custom Action:

add_action( ‘woocommerce_after_single_variation’, ‘my_custom_action’, 5 );

function my_custom_action() {
echo ‘TEST’;
}

Add Custom Action:

add_action( ‘woocommerce_after_add_to_cart_button’, ‘my_custom_action’, 5 );

function my_custom_action() {
echo ‘TEST’;
}

Add Custom Action:

add_action( ‘woocommerce_after_variations_form’, ‘my_custom_action’, 5 );

function my_custom_action() {
echo ‘TEST’;
}

Add Custom Action:

add_action( ‘woocommerce_after_variations_form’, ‘my_custom_action’, 5 );

function my_custom_action() {
echo ‘TEST’;
}

Add Custom Action:

add_action( ‘woocommerce_after_variations_form’, ‘my_custom_action’, 5 );

function my_custom_action() {
echo ‘TEST’;
}

SKU: ПРО-989887
Category: Цветы 
Tags: Тег-1 Тег-2

Add Custom Action:

add_action( ‘woocommerce_product_meta_end’, ‘my_custom_action’, 5 );

function my_custom_action() {
echo ‘TEST’;
}

Add Custom Action:

add_action( ‘woocommerce_share’, ‘my_custom_action’, 5 );

function my_custom_action() {
echo ‘TEST’;
}

Default Actions:

add_action( ‘woocommerce_after_single_product_summary’, ‘woocommerce_output_product_data_tabs’, 10 );

add_action( ‘woocommerce_after_single_product_summary’, ‘woocommerce_upsell_display’, 15 );

add_action( ‘woocommerce_after_single_product_summary’, ‘woocommerce_output_related_products’, 20 );

Remove Default Actions:

remove_action( ‘woocommerce_after_single_product_summary’, ‘woocommerce_output_product_data_tabs’, 10 );

remove_action( ‘woocommerce_after_single_product_summary’, ‘woocommerce_upsell_display’, 15 );

remove_action( ‘woocommerce_after_single_product_summary’, ‘woocommerce_output_related_products’, 20 );

Add Custom Action:

add_action( ‘woocommerce_after_single_product_summary’, ‘my_custom_action’, 5 );

function my_custom_action() { echo ‘TEST’; }

Вам также может понравиться .....

Add Custom Action:

add_action( ‘woocommerce_after_single_product’, ‘my_custom_action’, 5 );

function my_custom_action() { echo ‘TEST’; }

WooCommerce Single Product Page Default Actions

add_action( 'woocommerce_before_single_product', 'wc_print_notices', 10 );
add_action( 'woocommerce_before_single_product_summary', 'woocommerce_show_product_sale_flash', 10 );
add_action( 'woocommerce_before_single_product_summary', 'woocommerce_show_product_images', 20 );
add_action( 'woocommerce_product_thumbnails', 'woocommerce_show_product_thumbnails', 20 );
add_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_title', 5 );
add_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_rating', 10 );
add_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_price', 10 );
add_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_excerpt', 20 );
add_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_meta', 40 );
add_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_sharing', 50 );
add_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_add_to_cart', 30 );
// функция woocommerce_template_single_add_to_cart() генерирует следующие 4 действия

add_action( 'woocommerce_simple_add_to_cart', 'woocommerce_simple_add_to_cart', 30 );

add_action( 'woocommerce_grouped_add_to_cart', 'woocommerce_grouped_add_to_cart', 30 );

add_action( 'woocommerce_variable_add_to_cart', 'woocommerce_variable_add_to_cart', 30 );

add_action( 'woocommerce_external_add_to_cart', 'woocommerce_external_add_to_cart', 30 );

add_action( 'woocommerce_single_variation', 'woocommerce_single_variation', 10 );

add_action( 'woocommerce_single_variation', 'woocommerce_single_variation_add_to_cart_button', 20 );

add_action( 'woocommerce_after_single_product_summary', 'woocommerce_output_product_data_tabs', 10 );

add_action( 'woocommerce_after_single_product_summary', 'woocommerce_upsell_display', 15 );

add_action( 'woocommerce_after_single_product_summary', 'woocommerce_output_related_products', 20 );