Home Forums Front-end Issues Show ACF field in WooCommerce Archive Listing Reply To: Show ACF field in WooCommerce Archive Listing

  • Hi i want to do something similar. I have a acf input field called “contado_en_local” and i want to replace the woocommerce regular price with it in the archive product page.
    The problem is that the acf field appears, but above the title and i want it below, and also it didn’t removed the woocommerce default regular price.
    Also i don’t how to style it. It is donde in the child-theme’s style.css?
    I made a custom plugin called WOOCOMMERCE ALE BIANCHI and insert this code in wp-content/plugins/woocommerce-ale-bianchi-audioarte.

     Plugin URI: 
     Description: Funciones personalizadas Woocommerce para AudioArte 
     Version: 1.0.0 
     Author: ALE BIANCHI 
     Author URI: 
     License: GPL 2+ 
     License URI: 
     //* Mostrar precio CONTADO creado con ACF en vez de DEBITO colocado en precio regular Woocommerce
    add_action( 'after_setup_theme', 'ale_custom_shop_woocommmerce' );
    function ale_custom_shop_woocommmerce () {
     remove_action( 'woocommerce_after_shop_loop_item_title', 'woocommerce_template_loop_price', 10 );
     function ale_acf_precio() {
    		echo '<p>' . get_field('contado_en_local') . '</p>';
    	add_filter( 'woocommerce_after_shop_loop_item_title', 'ale_acf_precio', 15 );