• Resolved 019mrb

    (@019mrb)


    Today I enabled a product on catalog mode
    And the pages where this product was shown , the price of all products wasn’t shown

    I investigated the issue and the problem could be on wc-frontend-manager\core\class-wcfm-catalog.php

    Line 116:
    remove_action( 'woocommerce_after_shop_loop_item_title', 'woocommerce_template_loop_price', 10 );

    This line remove all the prices on the all loop, not only in the product

Viewing 3 replies - 16 through 18 (of 18 total)
  • 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.

Viewing 3 replies - 16 through 18 (of 18 total)
  • The topic ‘Catalog mode on product conflict’ is closed to new replies.