Last active
January 14, 2016 14:36
-
-
Save BurlesonBrad/b9e811441dd89348ca9f to your computer and use it in GitHub Desktop.
For Nikki ~ Change Text in WooCommerce
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Plugin Name: Nikki Gets to Change Her Text | |
* Plugin URI: https://bradgriffin.me | |
* Description: | |
* Version: 1 | |
* Author: Brad | |
* Author URI: https://bradgriffin.me | |
* Requires at least: 4.5 | |
* Tested up to: 4.5 | |
**/ | |
/* Customize All Text */ | |
/* Simply drop this file into your plugins folder via FTP or add the code to your child themes functions.php */ | |
/* See the pattern below? Take the text you want to change & put in between the single quote right after the word case */ | |
/* Now add the NEW text that you want on the next line between the single quotes */ | |
function bkg_text_strings( $translated_text, $text, $domain ) { | |
switch ( $translated_text ) { | |
case 'Cart Totals' : | |
$translated_text = __( 'Here are your items!', 'woocommerce' ); | |
break; | |
} | |
switch ( $translated_text ) { | |
case 'Billing Details' : | |
$translated_text = __( 'Lets Talk About You', 'woocommerce' ); | |
break; | |
} | |
switch ( $translated_text ) { | |
case 'Your order' : | |
$translated_text = __( 'Sweetness! Here Are Your Items!', 'woocommerce' ); | |
break; | |
} | |
switch ( $translated_text ) { | |
case 'Shop' : | |
$translated_text = __( 'Grab Whatever You Need!', 'woocommerce' ); | |
break; | |
} | |
switch ( $translated_text ) { | |
case 'Add To Cart' : | |
$translated_text = __( 'Heck Yeah!', 'woocommerce' ); | |
break; | |
} | |
switch ( $translated_text ) { | |
case 'No products in the cart.' : | |
$translated_text = __( 'Awww. Look at that lonely Cart. It seems so Empty!', 'woocommerce' ); | |
break; | |
} | |
switch ( $translated_text ) { | |
case 'Your cart is currently empty.' : | |
$translated_text = __( 'Your Cart Seems So Empty. Lets fill it Up!', 'woocommerce' ); | |
break; | |
} | |
switch ( $translated_text ) { | |
case 'Continue to payment' : | |
$translated_text = __( 'Great Job! Now Click Here To Finish!', 'woocommerce' ); | |
break; | |
} | |
return $translated_text; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment