Changeset 3016324
- Timestamp:
- 01/02/2024 08:42:11 AM (2 years ago)
- Location:
- gift4u-gift-cards-all-in-one-for-woo/trunk
- Files:
-
- 6 edited
-
CHANGELOG.txt (modified) (1 diff)
-
admin/admin.php (modified) (5 diffs)
-
gift4u-gift-cards-all-in-one-for-woo.php (modified) (3 diffs)
-
inc/classes/email.php (modified) (2 diffs)
-
inc/utils.php (modified) (1 diff)
-
readme.txt (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
gift4u-gift-cards-all-in-one-for-woo/trunk/CHANGELOG.txt
r2959714 r3016324 1 /**1.0.5 - 2024.01.02**/ 2 – Fixed: Generate expired date in PDF file 3 1 4 /**1.0.4 - 2023.08.29**/ 2 5 – Fixed: Generate expired date -
gift4u-gift-cards-all-in-one-for-woo/trunk/admin/admin.php
r2959714 r3016324 132 132 public function add_giftcard_product_options() { 133 133 ?> 134 <div class='options_group show_if_giftcard'>135 <div class="gift4u-tabular-menu">136 <div class="gift4u-tab-item gift4u-active" data-tab="general">134 <div class='options_group show_if_giftcard'> 135 <div class="gift4u-tabular-menu"> 136 <div class="gift4u-tab-item gift4u-active" data-tab="general"> 137 137 <?php esc_html_e( 'General', 'gift4u-gift-cards-all-in-one-for-woo' ); ?> 138 </div>139 <div class="gift4u-tab-item" data-tab="coupon">138 </div> 139 <div class="gift4u-tab-item" data-tab="coupon"> 140 140 <?php esc_html_e( 'Coupon', 'gift4u-gift-cards-all-in-one-for-woo' ); ?> 141 </div>142 143 </div>141 </div> 142 143 </div> 144 144 <?php 145 145 include_once plugin_dir_path( __FILE__ ) . 'views/html-product-general-options.php'; 146 146 include_once plugin_dir_path( __FILE__ ) . 'views/html-product-coupon-options.php'; 147 147 ?> 148 </div>148 </div> 149 149 <?php 150 150 } … … 152 152 private function pro_option_field( $label ) { 153 153 ?> 154 <p class="form-field ">155 <label for="crosssell_ids"><?php echo esc_html( $label ) ?></label>156 <a href="#" target="_blank" class="button"><?php echo esc_html__( 'Unlock this feature', 'gift4u-gift-cards-all-in-one-for-woo' ) ?></a>157 </p>154 <p class="form-field "> 155 <label for="crosssell_ids"><?php echo esc_html( $label ) ?></label> 156 <a href="#" target="_blank" class="button"><?php echo esc_html__( 'Unlock this feature', 'gift4u-gift-cards-all-in-one-for-woo' ) ?></a> 157 </p> 158 158 <?php 159 159 } … … 422 422 } 423 423 424 $expiry_date = $gc_coupon->get_expiry_date(); 425 if ( ! $expiry_date ) { 426 $coupon_options = $gc_coupon->get_coupon_options(); 427 428 if ( ! empty( $coupon_options['expiry_date'] ) ) { 429 $date = strtotime( "+{$coupon_options['expiry_date']} day" ); 430 431 $gc_coupon->set_expiry_date( $date ); 432 } 433 } 434 435 $gc_coupon->save(); 436 424 437 $pdf = new PDF( $gc_coupon ); 425 438 $pdf->get_download(); … … 438 451 if ( ! empty( $coupon_ids ) ) { 439 452 ?> 440 <div class='gift4u-coupon-list'>453 <div class='gift4u-coupon-list'> 441 454 <?php 442 455 foreach ( $coupon_ids as $id ) { … … 457 470 } 458 471 ?> 459 </div>472 </div> 460 473 <?php 461 474 } -
gift4u-gift-cards-all-in-one-for-woo/trunk/gift4u-gift-cards-all-in-one-for-woo.php
r2959715 r3016324 5 5 * Description: Unlock the potential of gift card products and see how they attract customers. Easily create, sell, and manage a WooCommerce gift card with a few simple steps. 6 6 * Author: VillaTheme 7 * Version: 1.0. 47 * Version: 1.0.5 8 8 * Author URI: http://villatheme.com 9 9 * Text Domain: gift4u-gift-cards-all-in-one-for-woo … … 11 11 * Copyright 2023 VillaTheme.com. All rights reserved. 12 12 * Requires at least: 5.0 13 * Tested up to: 6. 313 * Tested up to: 6.4 14 14 * WC requires at least: 5.0 15 * WC tested up to: 8. 015 * WC tested up to: 8.4 16 16 * Requires PHP: 7.0 17 17 */ … … 41 41 42 42 self::$args = [ 43 'version' => '1.0. 4',43 'version' => '1.0.5', 44 44 'plugin_name' => 'GIFT4U - Gift Cards All in One for Woo', 45 45 'slug' => 'gift4u-gift-cards-all-in-one-for-woo', -
gift4u-gift-cards-all-in-one-for-woo/trunk/inc/classes/email.php
r2959714 r3016324 66 66 } 67 67 68 $expiry_date = $this->gc_coupon->get_expiry_date(); 69 70 if ( ! $expiry_date ) { 71 $coupon_options = $this->gc_coupon->get_coupon_options(); 72 73 if ( ! empty( $coupon_options['expiry_date'] ) ) { 74 $date = strtotime( "+{$coupon_options['expiry_date']} day" ); 75 76 $this->gc_coupon->set_expiry_date( $date ); 77 } 78 } 79 68 80 $attachments = []; 69 81 $file = $add_card_pdf_to_email ? $this->generate_card_pdf() : ''; … … 78 90 79 91 if ( $result ) { 80 $expiry_date = $this->gc_coupon->get_expiry_date();81 82 if ( ! $expiry_date ) {83 $coupon_options = $this->gc_coupon->get_coupon_options();84 85 if ( ! empty( $coupon_options['expiry_date'] ) ) {86 $date = strtotime( "+{$coupon_options['expiry_date']} day" );87 88 $this->gc_coupon->set_expiry_date( $date );89 }90 }91 92 92 $this->gc_coupon->set_delivery_status( 'sent' ); 93 93 $this->gc_coupon->set_delivery_date( time() ); 94 $this->gc_coupon->save();95 94 } 95 96 $this->gc_coupon->save(); 96 97 97 98 if ( $file ) { -
gift4u-gift-cards-all-in-one-for-woo/trunk/inc/utils.php
r2885345 r3016324 275 275 '{message}' => $message, 276 276 '{coupon_expiry_date}' => $date_expiry instanceof \WC_DateTime ? $date_expiry->date_i18n( wc_date_format() ) : '', 277 '{apply_coupon_url}' => add_query_arg( [ 'gift4u_coupon' => $gc_coupon->get_coupon_code() ], site_url() ),277 '{apply_coupon_url}' => add_query_arg( [ 'gift4u_coupon' => $gc_coupon->get_coupon_code() ], apply_filters( 'gift4u_apply_coupon_url', site_url() ) ), 278 278 ] ); 279 279 -
gift4u-gift-cards-all-in-one-for-woo/trunk/readme.txt
r2959715 r3016324 246 246 == Changelog == 247 247 248 /**1.0.5 - 2024.01.02**/ 249 – Fixed: Generate expired date in PDF file 250 248 251 /**1.0.4 - 2023.08.29**/ 249 252 – Fixed: Generate expired date
Note: See TracChangeset
for help on using the changeset viewer.