Changeset 1764100
- Timestamp:
- 11/12/2017 05:44:55 AM (7 years ago)
- Location:
- woocommerce-upcoming-product/trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
woocommerce-upcoming-product/trunk/readme.txt
r1761379 r1764100 48 48 49 49 == Change log == 50 51 52 53 50 54 51 55 = 1.5.8.2 = Oct 06, 2017 -
woocommerce-upcoming-product/trunk/woocommerce-upcoming-product.php
r1741941 r1764100 79 79 add_action( 'woocommerce_process_product_meta_bundle', array( $this, 'wup_save_upcoming_options' ), 10 ); 80 80 81 81 82 82 add_filter( 'woocommerce_add_to_cart_validation', array( $this, 'wup_stop_adding_to_cart' ), 2, 10 ); 83 83 … … 228 228 /** 229 229 * Show action links on the plugin screen. 230 * 230 * 231 231 * @since 1.5.6 232 232 * … … 256 256 $woocommerce_loop['name'] = $loop_name; 257 257 $query_args = apply_filters( 'woocommerce_shortcode_products_query', $query_args, $atts, $loop_name ); 258 258 259 259 $products = new WP_Query( $query_args ); 260 260 … … 382 382 * - with precision = 2 : 3 days, 4 hours 383 383 * - with precision = 3 : 3 days, 4 hours, 12 minutes 384 * 384 * 385 385 * From: http://www.if-not-true-then-false.com/2010/php-calculate-real-differences-between-two-dates-or-timestamps/ 386 386 * 387 387 * @param mixed $time1 a time (string or timestamp) 388 388 * @param mixed $time2 a time (string or timestamp) 389 * @param integer $precision Optional precision 389 * @param integer $precision Optional precision 390 390 * @return string time difference 391 391 */ … … 572 572 * 573 573 * @since 1.0 574 * 574 * 575 575 * @param int $post_id 576 576 */ … … 578 578 $_upcoming = isset( $_POST['_upcoming'] ) ? $_POST['_upcoming'] : ''; 579 579 $_available_on = ( isset( $_POST['_available_on'] ) ) ? wc_clean( $_POST['_available_on'] ) : ''; 580 580 581 581 update_post_meta( $post_id, '_upcoming', $_upcoming ); 582 582 update_post_meta( $post_id, '_available_on', $_available_on ); … … 587 587 * 588 588 * @since 1.5.5 589 * 589 * 590 590 * @param bool true 591 591 * @param int $product_id … … 642 642 * 643 643 * @param obj 644 * 644 * 645 645 * @return obj 646 646 */ … … 687 687 <strong> 688 688 <?php 689 if ( !empty( WC_Admin_Settings::get_option( 'wup_availabel_date_lebel', 'Available from' ) ) ) { 690 $available_date_text = WC_Admin_Settings::get_option( 'wup_availabel_date_lebel', 'Available from' ) . ': '; 689 $available_date = WC_Admin_Settings::get_option( 'wup_availabel_date_lebel', 'Available from' ); 690 if ( !empty( $available_date ) ) { 691 $available_date_text = $available_date . ': '; 691 692 echo $available_date_text; 692 693 } 693 if ( empty( $_available_on ) ) { 694 if ( empty( $_available_on ) ) { 694 695 $not_available_date_text = WC_Admin_Settings::get_option( 'wup_not_availabel_date_text', 'Date not set yet' ); 695 696 echo $not_available_date_text; … … 700 701 echo $this->wup_get_date_diff( current_time('timestamp'), $_available_on ); 701 702 } 702 } 703 } 703 704 ?> 704 705 </strong> … … 730 731 echo WC_Admin_Settings::get_option( 'wup_availabel_date_lebel', 'Available from' ) . ': '; 731 732 } 732 if ( empty( $_available_on ) ) { 733 if ( empty( $_available_on ) ) { 733 734 echo WC_Admin_Settings::get_option( 'wup_not_availabel_date_text', 'Date not set yet' ); 734 735 }else { … … 738 739 echo $this->wup_get_date_diff( current_time('timestamp'), $_available_on ); 739 740 } 740 } 741 } 741 742 ?> 742 743 </strong>
Note: See TracChangeset
for help on using the changeset viewer.