Changeset 3032695
- Timestamp:
- 02/07/2024 12:23:05 PM (6 months ago)
- Location:
- gift-pack-for-woocommerce
- Files:
-
- 43 added
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
gift-pack-for-woocommerce/trunk/README.txt
r3005592 r3032695 6 6 Tested up to: 6.4 7 7 Requires PHP: 7.4 8 Stable tag: 1.1. 38 Stable tag: 1.1. 9 9 License: GPLv2 or later 10 10 License URI: https://www.gnu.org/licenses/gpl-2.0.html … … 29 29 * Easy to use & customize 30 30 * Fully Compatible with WPML 31 32 31 33 32 34 == Installation == … … 97 99 == Changelog == 98 100 101 102 103 104 99 105 = 1.1.3 = 100 106 * Fix – WPML fixes for Global price -
gift-pack-for-woocommerce/trunk/admin/class-gift-pack-for-woocommerce-admin.php
r3005592 r3032695 711 711 } 712 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 713 749 wp_redirect(admin_url('admin.php?page=gift-pack-for-woocommerce&update-status=true')); 714 750 } 715 751 } 752 753 -
gift-pack-for-woocommerce/trunk/admin/partials/gift-pack-for-woocommerce-admin-display.php
r3005592 r3032695 461 461 </ul> 462 462 </div> 463 <div class="submit gpfw_save_changes_btn"> 464 <input type="submit" name="Submit" class="button-primary" value="<?php echo esc_attr( 'Save Changes' ) ?>" /> 465 </div> 463 464 <!--Enable Gift Pack Popup--> 465 <div class="global_price_value"> 466 <div class="gpfw_gift_pack_message backend_field_title"> 467 <?php esc_html_e('Enable Gift Pack Popup', 'gift-pack-for-woocommerce'); ?> 468 </div> 469 <input type="checkbox" name="gpfw_popup_option" id="gpfw_popup_option" value="yes" <?php echo empty($gpfw_options['gpfw_popup_option']) ? '' : 'checked'; ?>> 470 </div> 471 <div class="submit gpfw_save_changes_btn"> 472 <input type="submit" name="Submit" class="button-primary" value="<?php echo esc_attr( 'Save Changes' ) ?>" /> 473 </div> 466 474 </div> 467 475 </form> -
gift-pack-for-woocommerce/trunk/gift-pack-for-woocommerce.php
r3005592 r3032695 17 17 * Plugin URI: https://wordpress.org/plugins/gift-pack-for-woocommerce/ 18 18 * Description: Allow customers add gift pack/wrapping to individual products from product pages 19 * Version: 1.1. 319 * Version: 1.1. 20 20 * Author: IT Path Solutions 21 21 * Author URI: https://www.itpathsolutions.com/ … … 36 36 * Rename this for your plugin and update it as you release new versions. 37 37 */ 38 define( 'GIFT_PACK_FOR_WOOCOMMERCE_VERSION', '1.1. 3' );38 define( 'GIFT_PACK_FOR_WOOCOMMERCE_VERSION', '1.1.' ); 39 39 40 40 /** -
gift-pack-for-woocommerce/trunk/includes/class-gift-pack-for-woocommerce.php
r3005592 r3032695 243 243 $options['gpfw_cat_enable'] = get_option($gpfw_cat_enable); 244 244 245 245 246 $gpfw_pro_cat = 'gpfw_pro_cat' . $current_language; 246 247 $options['gpfw_pro_cat'] = get_option($gpfw_pro_cat); 248 249 250 247 251 248 252 return $options; -
gift-pack-for-woocommerce/trunk/public/js/gift-pack-for-woocommerce-public.js
r3005592 r3032695 1 jQuery(function($) { 1 jQuery(document).ready(function($) { 2 if($('div.gpwf_popup_enable').length){ 3 var initPhotoSwipeFromDOM = function(gallerySelector) { 4 var parseThumbnailElements = function(el) { 5 var items = []; 6 el.find('.gift_pack_input').each(function() { 7 var $input = $(this).find('img'); 8 var item = { 9 src: $input.attr('src'), 10 w: 500, 11 h: 500, 12 }; 13 items.push(item); 14 }); 15 return items; 16 }; 17 18 var openPhotoSwipe = function(index, galleryElement) { 19 var pswpElement = document.querySelectorAll('.pswp')[0]; 20 var items = parseThumbnailElements(galleryElement); 21 var options = { 22 index: index, 23 24 }; 25 26 if (items.length > 0) { 27 var gallery = new PhotoSwipe(pswpElement, PhotoSwipeUI_Default, items, options); 28 gallery.init(); 29 } 30 }; 31 32 $(document).on('click', gallerySelector + ' img', function() { 33 var index = $(this).closest('.gift_pack_input').index(); 34 openPhotoSwipe(index, $(this).closest(gallerySelector)); 35 }); 36 }; 37 } 38 39 40 // Load gpfw_option_input class functionality 2 41 var gpfw_option_input = 'input[name="gift_pack_option"]'; 3 42 $(document).on('change',gpfw_option_input,function(){ 43 44 4 45 if($(this).prop('checked') === true) { 5 46 var variable_pro = false; … … 59 100 } 60 101 } 102 103 104 105 106 107 108 109 110 61 111 }); 112 113 62 114 } 63 115 else{ … … 110 162 }); 111 163 } 164 112 165 }); 113 166 … … 144 197 $('.gift-pack_for-woocommerce-parent').html(''); 145 198 }); 199 146 200 }); 147 201 … … 153 207 }); 154 208 } 209 210 211 -
gift-pack-for-woocommerce/trunk/public/partials/gift-pack-for-woocommerce-public-display.php
r3005592 r3032695 30 30 return; 31 31 } 32 33 34 35 36 32 37 } 33 38 … … 135 140 </div> 136 141 <?php } ?> 137 <div class="gift-pack_for-woocommerce-parent ">142 <div class="gift-pack_for-woocommerce-parent"> 138 143 </div> -
gift-pack-for-woocommerce/trunk/public/partials/gift-pack-html.php
r2861834 r3032695 1 1 <?php 2 2 3 $gpfw_object = Gift_Pack_For_Woocommerce::gpfw_get_options(); 4 5 $html = ''; 6 $default_img_arr = array(); 7 $hidden = array(); 8 $data = array(); 9 $gpfwproductID = (int)stripslashes($_POST['gpfwproductID']); 10 $var_pro_ID = (int)stripslashes($_POST['var_pro_ID']); 11 if($gpfwproductID == 0 && $var_pro_ID){ 12 $product = wc_get_product($var_pro_ID); 13 } 14 else{ 15 $product = wc_get_product($gpfwproductID); 16 } 17 $active_price = sanitize_text_field((float) $product->get_price()); 18 $gpfw_sale = 0; 19 20 if($gpfw_object['gpfw_global_price'] == true){ 21 $gift_pack_global_price = $gpfw_object['gpfw_gift_price']; 22 if($product->is_on_sale()){ 3 $gpfw_object = Gift_Pack_For_Woocommerce::gpfw_get_options(); 4 5 $html = ''; 6 $default_img_arr = array(); 7 $hidden = array(); 8 $data = array(); 9 $gpfwproductID = (int)stripslashes($_POST['gpfwproductID']); 10 $var_pro_ID = (int)stripslashes($_POST['var_pro_ID']); 11 if ($gpfwproductID == 0 && $var_pro_ID) { 12 $product = wc_get_product($var_pro_ID); 13 } else { 14 $product = wc_get_product($gpfwproductID); 15 } 16 $active_price = sanitize_text_field((float) $product->get_price()); 17 $gpfw_sale = 0; 18 19 if ($gpfw_object['gpfw_global_price'] == true) { 20 $gift_pack_global_price = $gpfw_object['gpfw_gift_price']; 21 if ($product->is_on_sale()) { 22 $gpfw_sale = 1; 23 } 24 } else { 25 if ($product->is_type('simple')) { 26 $gift_pack_global_price = get_post_meta($gpfwproductID, 'gift_pack_wrapper_price', true); 27 } else { 28 if ($product->is_on_sale()) { 23 29 $gpfw_sale = 1; 24 30 } 25 } 26 else{ 27 if($product->is_type('simple')){ 28 $gift_pack_global_price = get_post_meta($gpfwproductID,'gift_pack_wrapper_price',true); 31 $gift_pack_global_price = get_post_meta($var_pro_ID, 'gift_pack_wrapper_price', true); 32 } 33 } 34 35 $sum_price = $active_price + $gift_pack_global_price; 36 $gift_pack_global_price_html = wc_price($sum_price); 37 38 $default_img_arr['green'] = plugin_dir_url(__DIR__) . 'images/green_gift_pack.png'; 39 $default_img_arr['blue'] = plugin_dir_url(__DIR__) . 'images/blue_gift_pack.png'; 40 $default_img_arr['pink'] = plugin_dir_url(__DIR__) . 'images/pink_gift_pack.png'; 41 $default_img_arr['yellow'] = plugin_dir_url(__DIR__) . 'images/yellow_gift_pack.png'; 42 43 $images = get_posts( 44 array( 45 'post_type' => 'attachment', 46 'orderby' => 'post__in', 47 'order' => 'ASC', 48 'post__in' => explode(',', $gpfw_object['gpfw_gallery']), 49 'numberposts' => -1, 50 'post_mime_type' => 'image' 51 ) 52 ); 53 54 if ($_POST['gpfwcheckbox'] == 'checked') { 55 if ($gpfw_object['gpfw_global_price'] == '') { 56 if ($gpfw_object['gpfw_gallery'] == '' && $gpfw_object['gpfw_disable_gift_pack_images'] == '') { 57 $html .= '<div class="gpfw_giftpack_default_img">'; 58 $html .= '<div class="gpfw_add_gift_pack_label gpfw_choose_gift_pack_img">'; 59 60 if ($gpfw_object['gpfw_choose_gift_pack_img'] != '') { 61 $gpfw_choose_gift_pack_img = $gpfw_object['gpfw_choose_gift_pack_img']; 62 $html .= esc_html($gpfw_choose_gift_pack_img); 63 } else { 64 $html .= __('Select Gift Pack Image', "gift-pack-for-woocommerce"); 65 } 66 67 $html .= '</div>'; 68 69 $html .= '<div class="gpfw_giftpack_default_value">'; 70 $a = 1; 71 foreach ($default_img_arr as $key => $value) { 72 $checked = ($a == 1 ? 'checked' : ''); 73 $html .= '<div class="gift_pack_input"> 74 <label class="gpfw-radio-img"> 75 <input type="radio" name="gpfw_default_gift_pack_img" id="' . $key . '" class="gpfw-input-hidden" value="gpfw_' . $key . '_pack" ' . $checked . '> 76 <div class="gpfw_giftpack_image"> 77 <img src="' . esc_url($value) . '" alt="' . ucfirst($key) . ' Gift Pack"> 78 </div> 79 </label> 80 </div>'; 81 $a++; 82 } 83 $html .= '</div>'; 84 $html .= '</div>'; 85 } else { 86 if ($gpfw_object['gpfw_disable_gift_pack_images'] == '') { 87 $html .= '<div class="gpfw_giftpack_uploaded_value">'; 88 $html .= '<div class="gpfw_add_gift_pack_label gpfw_choose_gift_pack_img">'; 89 90 if ($gpfw_object['gpfw_choose_gift_pack_img'] != '') { 91 $gpfw_choose_gift_pack_img = $gpfw_object['gpfw_choose_gift_pack_img']; 92 $html .= esc_html($gpfw_choose_gift_pack_img); 93 } else { 94 $html .= __('Select Gift Pack Image', "gift-pack-for-woocommerce"); 95 } 96 $html .= '</div>'; 97 $html .= '<div class="gpfw_giftpack_uploaded_value">'; 98 if ($images) { 99 $a = 1; 100 foreach ($images as $image) { 101 $checked = ($a == 1 ? 'checked' : ''); 102 $hidden[] = $image->ID; 103 $image_src = wp_get_attachment_image_src($image->ID, array(500, 500)); 104 $gpfw_gift_pack_image_alt = get_post_meta($image->ID, '_wp_attachment_image_alt', TRUE); 105 106 $html .= '<div class="gift_pack_input"> 107 <label class="gpfw-radio-img"> 108 <input type="radio" alt="' . esc_attr($giftpack_image_alt) . '" name="gpfw_giftpack_uploaded_value" value="' . esc_attr($image->ID) . '" ' . $checked . '> 109 <div class="gpfw_giftpack_image"> 110 <img class="gpfw_radio_image" src="' . esc_url($image_src[0]) . '" attach-id="' . esc_attr($image->ID) . '" alt="' . esc_attr($giftpack_image_alt) . '" style="height: 100%; width: 100%;"/> 111 </div> 112 </label> 113 </div>'; 114 $a++; 115 } 116 } 117 $html .= '</div>'; 118 $html .= '</div>'; 119 } 29 120 } 30 else{ 31 if($product->is_on_sale()){ 32 $gpfw_sale = 1; 33 } 34 $gift_pack_global_price = get_post_meta($var_pro_ID,'gift_pack_wrapper_price',true); 121 } else if ($gpfw_object['gpfw_global_price'] == 1) { 122 if ($gpfw_object['gpfw_gallery'] == '') { 123 if ($gpfw_object['gpfw_disable_gift_pack_images'] == '') { 124 $html .= '<div class="gpfw_giftpack_default_img">'; 125 $html .= '<div class="gpfw_giftpack_default_value">'; 126 $a = 1; 127 foreach ($default_img_arr as $key => $value) { 128 $checked = ($a == 1 ? 'checked' : ''); 129 $html .= '<div class="gift_pack_input"> 130 <label class="gpfw-radio-img"> 131 <input type="radio" name="gpfw_default_gift_pack_img" id="' . $key . '" class="gpfw-input-hidden" value="gpfw_' . $key . '_pack" ' . $checked . '> 132 <div class="gpfw_giftpack_image"> 133 <img src="' . esc_url($value) . '" alt="' . ucfirst($key) . ' Gift Pack"> 134 </div> 135 </label> 136 </div>'; 137 $a++; 138 } 139 $html .= '</div>'; 140 $html .= '</div>'; 141 } 142 } else { 143 if ($gpfw_object['gpfw_disable_gift_pack_images'] == '') { 144 $html .= '<div class="gpfw_giftpack_uploaded_value">'; 145 $html .= '<div class="gpfw_add_gift_pack_label gpfw_choose_gift_pack_img">'; 146 if ($gpfw_object['gpfw_choose_gift_pack_img'] != '') { 147 $gpfw_choose_gift_pack_img = $gpfw_object['gpfw_choose_gift_pack_img']; 148 $html .= esc_html($gpfw_choose_gift_pack_img); 149 } else { 150 $html .= __('Select Gift Pack Image', "gift-pack-for-woocommerce"); 151 } 152 $html .= '</div>'; 153 $html .= '<div class="gpfw_giftpack_uploaded_value">'; 154 if ($images) { 155 $a = 1; 156 foreach ($images as $image) { 157 $checked = ($a == 1 ? 'checked' : ''); 158 $hidden[] = $image->ID; 159 $image_src = wp_get_attachment_image_src($image->ID, array(500, 500)); 160 $gpfw_gift_pack_image_alt = get_post_meta($image->ID, '_wp_attachment_image_alt', TRUE); 161 162 $html .= '<div class="gift_pack_input"> 163 <label class="gpfw-radio-img"> 164 <input type="radio" alt="' . esc_attr($giftpack_image_alt) . '" name="gpfw_giftpack_uploaded_value" value="' . esc_attr($image->ID) . '" ' . $checked . '> 165 <div class="gpfw_giftpack_image"> 166 <img class="gpfw_radio_image" src="' . esc_url($image_src[0]) . '" attach-id="' . esc_attr($image->ID) . '" alt="' . esc_attr($giftpack_image_alt) . '" style="height: 100%; width: 100%;"/> 167 </div> 168 </label> 169 </div>'; 170 $a++; 171 } 172 } 173 $html .= '</div>'; 174 $html .= '</div>'; 175 } 35 176 } 36 177 } 37 178 38 $sum_price = $active_price + $gift_pack_global_price; 39 $gift_pack_global_price_html = wc_price($sum_price); 40 41 $default_img_arr['green'] = plugin_dir_url(__DIR__) . 'images/green_gift_pack.png'; 42 $default_img_arr['blue'] = plugin_dir_url(__DIR__) . 'images/blue_gift_pack.png'; 43 $default_img_arr['pink'] = plugin_dir_url(__DIR__) . 'images/pink_gift_pack.png'; 44 $default_img_arr['yellow'] = plugin_dir_url(__DIR__) . 'images/yellow_gift_pack.png'; 45 46 47 $images = get_posts( 48 array( 49 'post_type' => 'attachment', 50 'orderby' => 'post__in', 51 'order' => 'ASC', 52 'post__in' => explode(',',$gpfw_object['gpfw_gallery']), 53 'numberposts' => -1, 54 'post_mime_type' => 'image' 55 ) 56 ); 57 58 if($_POST['gpfwcheckbox'] == 'checked'){ 59 if($gpfw_object['gpfw_global_price'] == ''){ 60 if($gpfw_object['gpfw_gallery'] == '' && $gpfw_object['gpfw_disable_gift_pack_images'] == ''){ 61 $html .= '<div class="gpfw_giftpack_default_img">'; 62 $html .= '<div class="gpfw_add_gift_pack_label gpfw_choose_gift_pack_img">'; 63 64 if($gpfw_object['gpfw_choose_gift_pack_img'] != '' ) { 65 $gpfw_choose_gift_pack_img = $gpfw_object['gpfw_choose_gift_pack_img']; 66 $html .= esc_html($gpfw_choose_gift_pack_img); 67 } 68 else{ 69 $html .= __('Select Gift Pack Image',"gift-pack-for-woocommerce"); 70 } 71 72 $html .= '</div>'; 73 74 $html .= '<div class="gpfw_giftpack_default_value">'; 75 $a = 1; 76 foreach($default_img_arr as $key => $value){ 77 $checked = ($a == 1 ? 'checked' : ''); 78 $html .= '<div class="gift_pack_input"> 79 <label class="gpfw-radio-img"> 80 <input type="radio" name="gpfw_default_gift_pack_img" id="'.$key.'" class="gpfw-input-hidden" value="gpfw_'.$key.'_pack" '.$checked.'> 81 <div class="gpfw_giftpack_image"> 82 <img src="'.esc_url($value).'" alt="'.ucfirst($key).' Gift Pack"> 83 </div> 84 </label> 85 </div>'; 86 $a++; 87 } 88 $html .= '</div>'; 89 $html .= '</div>'; 90 } 91 else{ 92 if($gpfw_object['gpfw_disable_gift_pack_images'] == '' ){ 93 $html .= '<div class="gpfw_giftpack_uploaded_value">'; 94 $html .= '<div class="gpfw_add_gift_pack_label gpfw_choose_gift_pack_img">'; 95 96 if($gpfw_object['gpfw_choose_gift_pack_img'] != '' ) { 97 $gpfw_choose_gift_pack_img = $gpfw_object['gpfw_choose_gift_pack_img']; 98 $html .= esc_html($gpfw_choose_gift_pack_img); 99 } 100 else{ 101 $html .= __('Select Gift Pack Image',"gift-pack-for-woocommerce"); 102 } 103 $html .= '</div>'; 104 $html .= '<div class="gpfw_giftpack_uploaded_value">'; 105 if($images){ 106 $a = 1; 107 foreach($images as $image){ 108 $checked = ($a == 1 ? 'checked' : ''); 109 $hidden[] = $image->ID; 110 $image_src = wp_get_attachment_image_src( $image->ID, array( 80, 80 ) ); 111 $gpfw_gift_pack_image_alt = get_post_meta($image->ID, '_wp_attachment_image_alt', TRUE); 112 113 $html .= '<div class="gift_pack_input"> 114 <label class="gpfw-radio-img"> 115 <input type="radio" alt="'.esc_attr($giftpack_image_alt).'" name="gpfw_giftpack_uploaded_value" value="'.esc_attr($image->ID).'" '.$checked.'> 116 <div class="gpfw_giftpack_image"> 117 <img class="gpfw_radio_image" src="'.esc_url($image_src[0]).'" attach-id="'.esc_attr($image->ID).'" alt="'.esc_attr($giftpack_image_alt).'" /> 118 </div> 119 </label> 120 </div>'; 121 $a++; 122 } 123 } 124 $html .= '</div>'; 125 $html .= '</div>'; 126 } 127 } 128 } 129 else if($gpfw_object['gpfw_global_price'] == 1){ 130 if($gpfw_object['gpfw_gallery'] == ''){ 131 if($gpfw_object['gpfw_disable_gift_pack_images'] == ''){ 132 $html .= '<div class="gpfw_giftpack_default_img">'; 133 $html .= '<div class="gpfw_giftpack_default_value">'; 134 $a = 1; 135 foreach($default_img_arr as $key => $value){ 136 $checked = ($a == 1 ? 'checked' : ''); 137 $html .= '<div class="gift_pack_input"> 138 <label class="gpfw-radio-img"> 139 <input type="radio" name="gpfw_default_gift_pack_img" id="'.$key.'" class="gpfw-input-hidden" value="gpfw_'.$key.'_pack" '.$checked.'> 140 <div class="gpfw_giftpack_image"> 141 <img src="'.esc_url($value).'" alt="'.ucfirst($key).' Gift Pack"> 142 </div> 143 </label> 144 </div>'; 145 $a++; 146 } 147 $html .= '</div>'; 148 $html .= '</div>'; 149 } 150 } 151 else{ 152 if($gpfw_object['gpfw_disable_gift_pack_images'] == '' ){ 153 $html .= '<div class="gpfw_giftpack_uploaded_value">'; 154 $html .= '<div class="gpfw_add_gift_pack_label gpfw_choose_gift_pack_img">'; 155 if($gpfw_object['gpfw_choose_gift_pack_img'] != '' ) { 156 $gpfw_choose_gift_pack_img = $gpfw_object['gpfw_choose_gift_pack_img']; 157 $html .= esc_html($gpfw_choose_gift_pack_img); 158 } 159 else{ 160 $html .= __('Select Gift Pack Image',"gift-pack-for-woocommerce"); 161 } 162 $html .= '</div>'; 163 $html .= '<div class="gpfw_giftpack_uploaded_value">'; 164 if($images){ 165 $a = 1; 166 foreach($images as $image){ 167 $checked = ($a == 1 ? 'checked' : ''); 168 $hidden[] = $image->ID; 169 $image_src = wp_get_attachment_image_src( $image->ID, array( 80, 80 ) ); 170 $gpfw_gift_pack_image_alt = get_post_meta($image->ID, '_wp_attachment_image_alt', TRUE); 171 172 $html .= '<div class="gift_pack_input"> 173 <label class="gpfw-radio-img"> 174 <input type="radio" alt="'.esc_attr($giftpack_image_alt).'" name="gpfw_giftpack_uploaded_value" value="'.esc_attr($image->ID).'" '.$checked.'> 175 <div class="gpfw_giftpack_image"> 176 <img class="gpfw_radio_image" src="'.esc_url($image_src[0]).'" attach-id="'.esc_attr($image->ID).'" alt="'.esc_attr($giftpack_image_alt).'" /> 177 </div> 178 </label> 179 </div>'; 180 $a++; 181 } 182 } 183 $html .= '</div>'; 184 $html .= '</div>'; 185 } 186 } 187 } 188 189 if($gpfw_object['gpfw_disable_gift_pack_note'] == '' ){ 190 $html .= '<div class="gpfw_giftpack_note"><div class="gpfw_giftpack_val"><textarea class="gpfw-gift-pack-note" name="gpfw-gift-pack-note" placeholder="'.( $gpfw_object['gpfw_gift_pack_note_placeholder'] == '' ? __("Gift Pack Note","gift-pack-for-woocommerce") : esc_html($gpfw_object['gpfw_gift_pack_note_placeholder']) ).'" 191 value="" minlength="5" maxlength="1000"></textarea> 192 </div> 193 </div>'; 194 } 195 196 $data['html'] = $html; 197 $data['gift_pack_global_price_html'] = $gift_pack_global_price_html; 198 $data['active_price'] = $active_price; 199 $data['gpfw_sale'] = $gpfw_sale; 200 if($gpfwproductID == 0 && $var_pro_ID){ 201 $data['active_price_set'] = wc_price($active_price); 202 } 203 } 204 else{ 205 $data['html'] = $html; 206 $data['gift_pack_global_price_html'] = wc_price($active_price); 207 $data['active_price'] = $active_price; 208 $data['gpfw_sale'] = $gpfw_sale; 209 if($gpfwproductID == 0 && $var_pro_ID){ 210 $data['active_price_set'] = wc_price($active_price); 211 } 212 } 213 echo json_encode($data); 179 if ($gpfw_object['gpfw_disable_gift_pack_note'] == '') { 180 $html .= '<div class="gpfw_giftpack_note"><div class="gpfw_giftpack_val"><textarea class="gpfw-gift-pack-note" name="gpfw-gift-pack-note" placeholder="' . ($gpfw_object['gpfw_gift_pack_note_placeholder'] == '' ? __("Gift Pack Note", "gift-pack-for-woocommerce") : esc_html($gpfw_object['gpfw_gift_pack_note_placeholder'])) . '" 181 value="" minlength="5" maxlength="1000"></textarea> 182 </div> 183 </div>'; 184 } 185 186 $data['html'] = $html; 187 $data['gift_pack_global_price_html'] = $gift_pack_global_price_html; 188 $data['active_price'] = $active_price; 189 $data['gpfw_sale'] = $gpfw_sale; 190 if ($gpfwproductID == 0 && $var_pro_ID) { 191 $data['active_price_set'] = wc_price($active_price); 192 } 193 } else { 194 $data['html'] = $html; 195 $data['gift_pack_global_price_html'] = wc_price($active_price); 196 $data['active_price'] = $active_price; 197 $data['gpfw_sale'] = $gpfw_sale; 198 if ($gpfwproductID == 0 && $var_pro_ID) { 199 $data['active_price_set'] = wc_price($active_price); 200 } 201 } 202 echo json_encode($data); 214 203 ?>
Note: See TracChangeset
for help on using the changeset viewer.