Thread Starter
019mrb
(@019mrb)
Why marked as resolved, it isn’t resolved
Thread Starter
019mrb
(@019mrb)
Following the last updates, my current solution:
if( $product_id &&
get_post_meta( $product_id, '_catalog', true) == 'yes' &&
get_post_meta( $product_id, 'disable_price', true) == 'yes' ) {
if(has_action('woocommerce_after_shop_loop_item_title', 'woocommerce_template_loop_price') ) {
remove_action( 'woocommerce_after_shop_loop_item_title', 'woocommerce_template_loop_price', 10 );
$WCFM->wcfm_has_catalog = true;
}
} elseif( !has_action('woocommerce_after_shop_loop_item_title', 'woocommerce_template_loop_price') && $WCFM->wcfm_has_catalog && apply_filters( 'wcfm_is_allow_add_to_cart_restore', true ) && !function_exists( 'rigid_related_products_args' ) && !function_exists( 'astra_header' ) && !function_exists( 'zita_post_loader' ) && !function_exists( 'oceanwp_get_sidebar' ) && !function_exists( 'x_get_stack' ) )
add_action( 'woocommerce_after_shop_loop_item_title', 'woocommerce_template_loop_price', 10 );
Moderator
Jan Dembowski
(@jdembowski)
Forum Moderator and Brute Squad
@019mrb Don’t make a topic about a topic. I’ve archived that new one.