• Resolved alis030

    (@alis030)


    Hello,

    I have a problem using the custom-mail filter on the “left $ to free shipping” notice.

    I added to my functions.php file the suggested text with the translated to Italian notice, and it works fine, but the post archives stopped working and it doesn’t show any posts anymore.

    I searched online and found a potential conflict between the theme and the post archives setting. It’s the elementor theme hello.

    How can I restore my post archives and use the translated text function?

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter alis030

    (@alis030)

    <?php

    /**
    * Theme functions and definitions
    *
    * @package HelloElementorChild
    */

    /**
    * Load child theme css and optional scripts
    *
    * @return void
    */
    function hello_elementor_child_enqueue_scripts()
    {
    wp_enqueue_style(
    ‘hello-elementor-child-style’,
    get_stylesheet_directory_uri() . ‘/style.css’,
    [
    ‘hello-elementor-theme-style’,
    ],
    ‘1.0.0’
    );
    function ele_disable_page_title($return)
    {
    return false;
    }
    add_filter(‘hello_elementor_page_title’, ‘ele_disable_page_title’);
    }
    add_action(‘wp_enqueue_scripts’, ‘hello_elementor_child_enqueue_scripts’, 20);

    add_filter(‘flexible_shipping_free_shipping_notice_text’, ‘wpdesk_flexible_shipping_free_shipping_notice_text’, 10, 2);
    function wpdesk_flexible_shipping_free_shipping_notice_text($notice_text, $amount)
    {
    return sprintf(‘Bastano solo %1$s in più per avere la spedizione gratuita!’, wc_price($amount));
    }

    • This reply was modified 2 years, 4 months ago by alis030.
    • This reply was modified 2 years, 4 months ago by alis030.
    Plugin Support Marta Borówka

    (@martapaw)

    Hello @alis030,

    If you experienced a conflict with the theme, I suggest using another plugin to translate this notice, for example, Loco Translate than using this snippet.

    Best regards,
    Marta

    Thread Starter alis030

    (@alis030)

    Hi Marta,

    The plugin loco translate is terrific! Thanks for sharing it.

    Have a great day!

    Greg

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Left to free shipping conflict functions.php theme page’ is closed to new replies.