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 //* do not add this line | |
/** | |
* enter the code into the functions.php file | |
*/ | |
add_filter( "bricks/elements/heading/controls", 'bu_filter_heading_element_controls' ); | |
function bu_filter_heading_element_controls( $controls ) { | |
$controls['tag']['options']['custom'] = esc_html__('Custom'); |
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 //* do not include this line | |
add_filter( 'woocommerce_order_button_text', 'ouwoo_custom_place_order_text'); | |
function ouwoo_custom_place_order_text( $button_text ) { | |
$button_text = "ENTERYOURTEXT"; | |
return $button_text; | |
} |
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 //* do not include this line | |
add_filter( 'gettext_woocommerce', 'ouwoo_translate_cart_text', 10, 3); | |
function ouwoo_translate_cart_text( $translated_text, $text, $domain ) { | |
switch( $translated_text ) { | |
case 'No products in the cart.' : | |
$translated_text = "Please add some products from our shop, so we can generate a quote for you."; | |
break; | |
} | |
return $translated_text; |
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 //* do not include this line if you are adding into the functions.php file | |
/** | |
* Write the code in snippets plugin | |
*/ | |
add_filter( 'before_after_image_initial_offset', 'ou_change_before_after_image_initial_offset'); | |
function ou_change_before_after_image_initial_offset( $offset ) { | |
global $post; | |
if( ! is_a( $post, 'WP_Post') ) |
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 // do not include this line and enter the bottom code in your theme's functions.php file | |
/** | |
* Hiding the element based on the condition | |
* | |
* @author Chinmoy Paul | |
* @version 1.0 | |
*/ | |
class EmptyElement { | |
public function render_element( $extra_data ) { | |
echo ''; |
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 | |
/** | |
* Getting on sale product ids | |
* @use wc_get_product_ids_on_sale function | |
* return string | |
*/ | |
function ouwoo_wc_get_product_ids_on_sale() { | |
return implode( ",", (array) wc_get_product_ids_on_sale() ); | |
} |
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 //* Don't add this line | |
add_action( 'woocommerce_before_mini_cart_contents', 'ouwoo_custom_remove_icon', 11 ); | |
function ouwoo_custom_remove_icon() { | |
remove_filter( 'woocommerce_cart_item_remove_link', 'ouwoo_woo_cart_remove_button', 10, 2 ); | |
add_filter( 'woocommerce_cart_item_remove_link', 'ouwoo_add_custom_remove_button_icon', 10, 2 ); | |
} | |
function ouwoo_add_custom_remove_button_icon($remove_link, $cart_item_key ) { |
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 | |
add_filter( 'gettext_woocommerce', 'ouwoo_coupon_placeholder_text', 10, 3); | |
function ouwoo_coupon_placeholder_text( $translated_text, $text, $domain ) { | |
switch( $translated_text ) { | |
case 'Enter coupon code' : | |
$translated_text = "ENTER YOUR TEXT HERE"; | |
break; | |
} | |
return $translated_text; |
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 | |
add_filter( 'gettext_woocommerce', 'ouwoo_new_total_text', 10, 3); | |
function ouwoo_new_total_text( $translated_text, $text, $domain ) { | |
switch( $translated_text ) { | |
case 'New Total:' : | |
$translated_text = "ENTER YOUR TEXT HERE"; | |
break; | |
} | |
return $translated_text; |
NewerOlder