How to change any text in WooCommerce

Although it has merit having the Spanish translation of WooCommerce sometimes in our online store we would prefer that some text shown was other either for personal or business reasons.

I mean texts like " Add to cart ", " Go to store ", " Offer "or any other text by default.

Well, it's very easy, you just have to adapt the following code to your needs:

You just have to customize it to your liking with the words you want to replace, and add it to the file functions.php of your theme child or to your plugin for customizations, fixes and so on.

Do you need to change more than one text in WooCommerce? [19659053] By popular petition, the article should be in case you need to change more than one text in your store.

If you need to change several texts again thanks to gettext we would then create a something more complex, like this:

Enjoy it and personalize it to your liking!

Loading …

That may also help you:

The vulnerability target = "_ blank" and the solution rel = "noopener noreferrer" of WordPress

Since version 4.7.4, WordPress incorporates the new version of the TinyMCE editor included which solves the one known as vulnerability target = "_ blank" and it does so by automatically adding to this type of links the relation rel = "noopener noreferrer" did you notice?

When the debate arose in the article about WordPress 4.7 news and then later opened it in the support forums I started to investigate a bit so let's put some light on this Subject

What is vulnerability target = "_ blank" ?

This vulnerability, also known as reverse tabnabbing a type of attack of phishing in which the attacker replaces the pe legitimate, and reliable, by a malicious document using the selector window.opener.location.assign () when accessed through an opening link in new window / tab, or type target = "_ Blank".

What the attacker does is, using the selector window.opener.location to take the user to some false page, which pretends to be the original one, or executes some JavaScript on the opening page that the user trusts.

Explained in a simple way, with the reverse tabnabbing when you click on a web to open a new page, and it opens in a new tab, if you then go back to the original web, without you realizing it, that false page is automatically changed, which pretends to be the good one .

It seems the original web page that you were seeing but has a different url (which can be clearly seen). The problem is that most of the users do not realize that the URL has changed, since they are not usually fixed almost never, unless they think they are on a website they trust, for example this one.

For example, the fake website will ask you to access your account again, and of course, but you are no longer where you thought you are coming from but in a copy of the original tab in which there is another document, in this case malicious. If you enter your data you have already delivered to the hackers and they will do anything with your credentials.

On this page you have an example (not malicious) of the reverse tabnabbing if you want to try it on your meats without danger.

What does the relation rel = "noopener noreferrer" ?

The mode of avoid vulnerability target = "_ blank" or reverse tabnabbing is to add to your links that open in a new window / tab link relationship rel = "noopener" and since the Firefox browser does not recognize this relationship, add the relation noreferrer after all, adding this: rel = "noopener noreferrer" .

] In this way, to avoid vulnerability, your external link should be something like this:

From this This eliminates the possibility of applying the aforementioned vulnerability. Simple, right? The bad thing is if you have to add this to each external link one by one, but we use WordPress right?

Does SEO affect adding noopener noreferrer ?

A question that has emerged in the forums and right here in the comments is whether this will affect something, for example, the links that have the attribute nofollow then modifies them by adding the attributes noopener noreferrer . [19659004] I mean if you had a link of this type in an entry …

If you update it it will be like this:

And the same question has arisen in general, if adding these link relations affects something to SEO .

Well, no, as they have responded from Google to questions from webmasters is a simple link, does not add or remove or affect the positioning to links, have nofollow or not, to which is added the noopener noreferrer [19659003]

How do you solve this WordPress vulnerability?

As I mentioned at the beginning of the article, WordPress, in version 4.7.4, incorporated the editor update included TinyMCE that solves this vulnerability by automatically adding the relation rel = "noopener noreferrer" to all links with target = "_ blank" tant or the new contents as existing ones if you open them for editing, a quite effective solution.

Of course, it is clear that WordPress / TinyMCE only adds the relation noopener noreferrer in the links that you decide that open in new window / tab, that is, in which you do this:

What if I do not want WordPress to protect me from the vulnerability reverse tabnabbing or what's it called?

If you prefer to live dangerously you can deactivate this functionality of the WordPress editor TinyMCE by adding the following code to your utility plugin or to the file functions.php of the active child topic, but DO NOT DO IT :

So what do I do?

Nothing really. The fact that the relation rel = "noopener noreferrer" is added to the links that open in a new window / tab is a security feature that protects you and your visitors from a serious vulnerability , theft of information and the fact that WordPress / TinyMCE protect us from this is good.

More information:

Loading …

That may also help you:

Fix error "Fatal error undefined function is_network_admin"

An error of the ugliest you can find in your installation of WordPress is the one that shows the gruesome phrase " Fatal error undefined function is_network_admin () ", an error that tends to is caused by a reason that does not seem very obvious to the view of the message ..

It is a typical error after an unsuccessful update of WordPress and it is usually shown when you try to access the administration of your site after the update with errors.

It may happen after an automatic update of WordPress or a manual made by you in which there has been some error of connection or upload of files.

The only solution is go back to update manually trying to avoid errors in the new installation . To do this follow these steps:

The only danger is that you do not follow the steps exactly, for example also uploading the folder wp-content (which you should not upload as you would upload your themes and plugins).

Divi Tutorial: Add Sensei compatibility

/ **

* Divi + Sensei Compatibility


* This part is to hide the notice of not compatible with Sensei in admin.

* /

add_action ( 'after_setup_theme' 'divi_sensei_support' ) ;

function divi_sensei_support () {

add_theme_support ( 'sensei' ) ;


/ **

] * We now remove the default containers from Sensei

* /

global $ woothemes_sensei ;

remove_action ( ] 'sensei_before_main_content' array ( $ woothemes_sensei -> frontend 'sensei_output_content_wrapper' ) [1 9659007] 10 ) ;

remove_action ( 'sensei_after_main_content' array ( $ woothemes_sensei -> frontend 'sensei_output_content_wrapper_end' ) 10 ) ;

/ **

* And we added content containers specific to Divi

* /

add_action ( ' sensei_before_main_content ' ' divi_sensei_wrapper_start ' 10 ) ;

add_action (' sensei_after_main_content ' ' divi_sensei_wrapper_end ' 10 ) ;

function divi_sensei_wrapper_start () {

echo '

' ;



// echo'



function divi_sensei_wrapper_end ( ) [

echo '

' ;

get_sidebar ( ) ;

echo '



How to change the background color of the global store warning in WooCommerce

WooCommerce has a very interesting functionality for to show a global warning in the form of a fixed bar which you can use to simply warn that you are in tests with a simple text or even to highlight offers, because it supports HTML

To activate it you just have to go to WooCommerce> Settings and, in the tab General activate the global warning, then customize your text, and as I have commented even using HTML at will .

What you do not have is the ability to customize your appearance, which you will always inherit from the active topic, at best.

But it's easy to change it, just open the WordPress Personalizer and in the section of CSS Add l add a bit of CSS to your liking, with the colors you choose example:

As you can see in the sample code you can use both the color name and its hexadecimal value whichever you prefer. What you get is to move on from this …

Depending on the color chosen light.