Skip to content
Advertisement

How add php code in archive product woocommerce plugin

I am trying to add code php after price (not on single product pages) but on shop pages and archive page woocommerce.

Code

<?php echo CFS()->get( 'name-code' ); ?>

This is the insert code from the Custom Field Suite plugin

Sincere thanks !

Advertisement

Answer

I found a great solution Here is the result

function woocommerce_after_cat_price() {
    echo CFS()->get( 'name-code' );
}
add_action( 'woocommerce_after_shop_loop_item_title', 'woocommerce_after_cat_price', 10, 5 );
User contributions licensed under: CC BY-SA
1 People found this is helpful
Advertisement