How to remove a word created by a plugin from the site

1

We use WordPress and WooCommerce on our site and to calculate freight we use the Postcode Shipping plugin. Our freight has 3 values (great São Paulo, SP interior and neighboring cities) and is fixed only charged per order and not per product.

The issue of having 3 fixed values for freight in part is already resolved. But when a customer informs a zip code that there is no freight medium available, it appears Free , how do I remove the word "Free"? I already researched the plugin file but could not.

    
asked by anonymous 27.08.2014 / 14:28

3 answers

1

Yes, the plugin does not have translation files ( nome-pt_BR.po or .mo ) . I also searched within WooCommerce and it is not. That means it's probably on your (or another plugin) theme .

The most direct way is to edit the # language files . To edit .po files use PoEdit (and upload the .mo file created) or the Codestyling Localization

Another possibility is to use jQuery:

add_filter( 'wp_head', function()
{
    if( !is_page( 'PÁGINA-DO-CARRINHO' ) ) // http://codex.wordpress.org/Conditional_Tags
        return;
    ?>
    <script type="text/javascript">
    jQuery(document).ready( function($) 
    { 
        $('#BOX-CORRESPONDENTE').text( 'Seu texto sem grátis' );
    });
    </script>
    <?php
});

Or, if none of this goes well, there is the heavy bar option which is to search within all translations to modify the string . To do this, use the Retranslate plugin by modifying the context to frontend .

    
27.08.2014 / 16:40
1

Original content:

  

My content. (Free)

Original HTML code:

<div>Meu conteúdo. (Grátis)</div>

Javascript to insert:

<body onload="document.body.innerHTML = document.body.innerHTML.replace('(Grátis)', '');">

Final result:

  

My content.

Brutal, but depending on your case effective.

Example in JSFiddle.

    
29.08.2014 / 22:23
0

Have you taken a good look at the plugin's configuration? It's a pretty silly mistake to happen, try to see direct plugin support

    
29.08.2014 / 21:32