| @@ -157,9 +157,9 @@ | ||
| 157 | 157 | $sale_html = '<a href="'.$sale_link.'">'.$sale_product.'</a>'; |
| 158 | 158 | |
| 159 | 159 | $regular_price = get_post_meta( $sale->post_id, '_regular_price', TRUE ); |
| 160 | 160 | $sale_price = get_post_meta( $sale->post_id, '_sale_price', TRUE ); |
| 161 | - $to_date_ux = intval(get_post_meta( $sale->post_id, '_sale_price_dates_to', TRUE )); | |
| 161 | + $to_date_ux = get_post_meta( $sale->post_id, '_sale_price_dates_to', TRUE ); | |
| 162 | 162 | $current_date_ux = time(); |
| 163 | 163 | |
| 164 | 164 | $woo_sales_datas['regular_price'] = sprintf( get_woocommerce_price_format(), $currency_symbol, $regular_price ); |
| 165 | 165 | $woo_sales_datas['sale_price'] = sprintf( get_woocommerce_price_format(), $currency_symbol, $sale_price ); |
| @@ -170,13 +170,9 @@ | ||
| 170 | 170 | $woo_sales_datas['dis_rate_percent'] = sprintf(__('%1$d% %2$s', 'simple-ticker'), $dis_rate, __('OFF', 'countdown-woocommerce-sale')); |
| 171 | 171 | |
| 172 | 172 | $woo_sales_datas['to_date'] = date_i18n( "Y-m-d H:i:s", $to_date_ux, FALSE ); |
| 173 | 173 | $interval_day_ux = $to_date_ux - $current_date_ux; |
| 174 | - if ( $to_date_ux > 0 ) { | |
| 175 | - $woo_sales_datas['interval_day'] = intval( $interval_day_ux / (60 * 60 * 24) ).__('Days', 'simple-ticker'); | |
| 176 | - } else { | |
| 177 | - $woo_sales_datas['interval_day'] = NULL; | |
| 178 | - } | |
| 174 | + $woo_sales_datas['interval_day'] = intval( $interval_day_ux / (60 * 60 * 24) ).__('Days', 'simple-ticker'); | |
| 179 | 175 | $woo_sales_datas['interval_time'] = gmdate( 'H:i:s' , $interval_day_ux % (60 * 60 * 24) ); |
| 180 | 176 | $ticker_html .= $sale_html; |
| 181 | 177 | $ticker_html .= '<span style="color: '.$woo_sales_color.'; font-weight: bold;"> : '; |
| 182 | 178 | $woo_sales_text = NULL; |