I have create Child theme from Shophistic Lite theme.
I want to remove an action in child theme.
// 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' );
...
// \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', 15 );
...
// \wp-content\themes\shophistic-lite-child\functions.php
...
function remove_functions() {
remove_action( 'woocommerce_after_shop_loop_item_title', 'shophistic_lite_show_attribute', 15 );
}
add_action('woocommerce_after_shop_loop_item' , 'remove_functions' );
...
I made it by this article: https://code.tutsplus.com/tutorials/a-guide-to-overriding-parent-theme-functions-in-your-child-theme--cms-22623
But it does no working for me. The shophistic_lite_show_attribute function is still executing.
Please help me to resolve this problem.
