This file contains 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
// Translate 'Back to Cart' | |
function translate_strings ( $translated_text, $text, $domain ) { | |
switch ( $translated_text ) { | |
case 'Back to Cart' : // change text | |
$translated_text = __( 'Bumalik sa Cart', 'woocommerce' ); | |
break; | |
} | |
return $translated_text; | |
} | |
add_filter( 'gettext', 'translate_strings', 20, 3 ); |
This file contains 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
/** | |
* Remove "From %s" format of pricing. | |
*/ | |
function iconic_was_remove_from() { | |
remove_filter( 'woocommerce_variable_price_html', array( 'Iconic_WAS_Fees', 'variable_price_html' ), 10, 2 ); | |
} | |
add_action( 'init', 'iconic_was_remove_from' ); |
This file contains 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
add_filter( 'woocommerce_cart_item_name', 'iconic_product_image_on_checkout', 10, 3 ); | |
function iconic_product_image_on_checkout( $name, $cart_item, $cart_item_key ) { | |
/* Return if not checkout page */ | |
if ( ! is_checkout() ) { | |
return $name; | |
} | |
/* Get product object */ |
This file contains 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
// First, let's write the function that returns a given product SKU | |
function iconic_return_sku( $product ) { | |
$sku = $product->get_sku(); | |
if ( ! empty( $sku ) ) { | |
return '<p>SKU: ' . $sku . '</p>'; | |
} else { | |
return ''; | |
} | |
} | |
This file contains 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
/** | |
* Iconic Linked Variations - Force show out of stock Linked Variations. | |
* | |
* @param array $product_data Product Data. | |
* @param int $product_id Product ID. | |
* | |
* @return array | |
*/ | |
function iconic_lv_force_show_out_of_stock_products( $product_data, $product_id ) { | |
foreach ( $product_data['attributes'] as &$attribute ) { |
NewerOlder