Hooks for WPML

This commit is contained in:
Mike Jolley 2012-04-12 11:25:50 +01:00
parent f510b40514
commit b5ed56c82d
2 changed files with 6 additions and 4 deletions

View File

@ -972,7 +972,7 @@ function woocommerce_upsell_crosssell_search_products() {
endif;
$posts = get_posts( $args );
$posts = apply_filters('woocommerce_upsell_crosssell_search_products', get_posts( $args ));
if ($posts) : foreach ($posts as $post) :

View File

@ -339,11 +339,13 @@ function woocommerce_price( $price, $args = array() ) {
$num_decimals = (int) get_option('woocommerce_price_num_decimals');
$currency_pos = get_option('woocommerce_currency_pos');
$currency_symbol = get_woocommerce_currency_symbol();
$price = number_format( (double) $price, $num_decimals, stripslashes(get_option('woocommerce_price_decimal_sep')), stripslashes(get_option('woocommerce_price_thousand_sep')) );
if (get_option('woocommerce_price_trim_zeros')=='yes' && $num_decimals>0) :
$price = apply_filters( 'raw_woocommerce_price', (double) $price );
$price = number_format( $price, $num_decimals, stripslashes(get_option('woocommerce_price_decimal_sep')), stripslashes(get_option('woocommerce_price_thousand_sep')) );
if (get_option('woocommerce_price_trim_zeros')=='yes' && $num_decimals>0)
$price = woocommerce_trim_zeros($price);
endif;
switch ($currency_pos) :
case 'left' :