我已经从Shophistic Lite主题创建了子主题。
我想删除子主题中的一个动作。
// wp-content\plugins\woocommerce\templates\content-product.php ...
/**
* woocommerce_shop_loop_item_title hook.
*
* @hooked woocommerce_template_loop_product_title - 10
*/
do_action( 'woocommerce_shop_loop_item_title' );
/**
* woocommerce_after_shop_loop_item_title hook.
*
* @hooked woocommerce_template_loop_rating - 5
* @hooked woocommerce_template_loop_price - 10
*/
do_action( 'woocommerce_after_shop_loop_item_title' );
/**
* woocommerce_after_shop_loop_item hook.
*
* @hooked woocommerce_template_loop_product_link_close - 5
* @hooked woocommerce_template_loop_add_to_cart - 10
*/
do_action( 'woocommerce_after_shop_loop_item' );
...
Run Code Online (Sandbox Code Playgroud)
// \wp-content\themes\shophistic-lite\framework\functions\woocommerce_support.php
...
/**
* Adds the Switch View buttons
*/
function shophistic_lite_show_attribute() {
...
}
add_action( 'woocommerce_after_shop_loop_item_title', 'shophistic_lite_show_attribute', …Run Code Online (Sandbox Code Playgroud)