Plugin Directory

Changeset 3280818


Ignore:
Timestamp:
04/24/2025 10:32:46 AM (8 months ago)
Author:
ThemeHigh
Message:

version 3.3.2

Location:
woo-extra-product-options/trunk
Files:
10 edited

Legend:

Unmodified
Added
Removed
  • woo-extra-product-options/trunk/admin/class-thwepof-admin-form-field.php

    r2723116 r3280818  
    4343            'heading'       => __('Heading', 'woo-extra-product-options'),
    4444            'paragraph'     => __('Paragraph', 'woo-extra-product-options'),
    45             'separator'     => __('Separator', 'woo-extra-product-options')
     45            'separator'     => __('Separator', 'woo-extra-product-options'),
     46            'timepicker'    => __('Time Picker', 'woo-extra-product-options'),
    4647        );
    4748    }
     
    271272        $this->render_form_field_paragraph();
    272273        $this->render_form_field_separator();
     274        $this->render_form_field_timepicker();
    273275       
    274276        $this->render_field_form_fragment_product_list();
     
    658660        </table>
    659661        <?php 
     662    }
     663
     664    private function render_form_field_timepicker(){
     665        $prop_value = $this->field_props['value'];
     666        $prop_value['label'] = __('Default Value', 'woo-extra-product-options');
     667
     668        ?>
     669        <table id="thwepof_field_form_id_timepicker" class="thwepo_pp_table" width="100%" style="display:none;">
     670            <?php
     671            $this->render_form_elm_row($this->field_props['title']);
     672            //$this->render_form_elm_row($this->field_props['title_position']);
     673            $this->render_form_elm_row($prop_value);
     674            $this->render_form_elm_row($this->field_props['placeholder']);
     675            //$this->render_form_elm_row($this->field_props['cssclass']);
     676            //$this->render_form_elm_row($this->field_props['title_class']);
     677
     678            $this->render_form_elm_row_cb($this->field_props['required']);
     679            $this->render_form_elm_row_cb($this->field_props['enabled']);
     680            $this->render_form_elm_row_cb($this->field_props['readonly']);
     681            ?>
     682        </table>
     683        <?php   
    660684    }
    661685
  • woo-extra-product-options/trunk/admin/class-thwepof-admin-settings-pro.php

    r2956784 r3280818  
    9292                    <div class="th-wepo-feature-list-ul">
    9393                        <ul class="th-wepo-feature-list">
    94                             <li>27 extra product fields</li>
     94                            <li>28 extra product fields</li>
    9595                            <li>Add, edit, rearrange, duplicate & delete fields and sections</li>
    9696                            <li>Display fields & sections conditionally</li>
     
    109109                            <li>Developer friendly with custom hooks</li>
    110110                            <li>Create your own custom classes for styling the fields & sections</li>
     111                            <li>Edit product options from cart</li>
    111112                        </ul>   
    112113                    </div>
     
    165166                                <li><?php echo __('Checkbox Group', 'woo-extra-product-options');?></li>
    166167                                <li><?php echo __('Date Picker', 'woo-extra-product-options');?></li>
    167                                 <li><?php echo __('Time Picker', 'woo-extra-product-options');?><span class="th-crown"><img src="<?php echo esc_url(THWEPOF_URL .'admin/assets/css/crown.svg'); ?>"></span></li>
     168                                <li><?php echo __('Time Picker', 'woo-extra-product-options');?></li>
    168169                                <li><?php echo __('Date & Time Range Picker', 'woo-extra-product-options');?><span class="th-crown"><img src="<?php echo esc_url(THWEPOF_URL .'admin/assets/css/crown.svg'); ?>"></span></li>
    169170                                <li><?php echo __('Color Picker', 'woo-extra-product-options');?></li>
     
    176177                                <li><?php echo __('HTML', 'woo-extra-product-options');?><span class="th-crown"><img src="<?php echo esc_url(THWEPOF_URL .'admin/assets/css/crown.svg'); ?>"></span></li>
    177178                                <li><?php echo __('Separator', 'woo-extra-product-options');?></li>
     179                                <li><?php echo __('Label swatches', 'woo-extra-product-options');?><span class="th-new"><img src="<?php echo esc_url(THWEPOF_URL .'admin/assets/css/new.png'); ?>"></span><span class="th-crown"><img src="<?php echo esc_url(THWEPOF_URL .'admin/assets/css/crown.svg'); ?>"></span></li>
    178180                            </ul>
    179181                        </div>
  • woo-extra-product-options/trunk/changelog.txt

    r3235322 r3280818  
    11=== Changelog ===
     2
     3= 3.3.2 =
     4* Added new field type "Time Picker".
     5* Added WooCommerce 9.8 compatibility.
     6* Added WordPress 6.8 compatibility.
    27
    38= 3.3.1 =
  • woo-extra-product-options/trunk/includes/class-thwepof.php

    r3156846 r3280818  
    4343                'includes/model/fields/class-wepof-field-switch.php',
    4444                'includes/model/fields/class-wepof-field-separator.php',
     45                'includes/model/fields/class-wepof-field-timepicker.php',
    4546                'includes/model/class-wepof-section.php',
    4647
  • woo-extra-product-options/trunk/includes/utils/class-thwepof-utils-field.php

    r3034429 r3280818  
    8383            }else if($type === 'paragraph'){
    8484                return new WEPOF_Product_Field_Paragraph();
     85            }else if($type === 'timepicker'){
     86                return new WEPOF_Product_Field_TimePicker();
    8587            }
    8688        }else{
     
    289291        }else if($field_type === 'separator'){
    290292            $field_html = self::get_html_separator($name, $field, $section, $value);
     293
     294        }else if($field_type === 'timepicker'){
     295            $field_html = self::get_html_timepicker($name, $field, $section, $value);
     296           
    291297        }
    292298       
     
    401407        }else if($type === 'colorpicker'){
    402408            $class[] = 'thwepof-colorpicker';
     409        }else if($type === 'timepicker'){
     410            $class[] = ' thwepof-time-picker';
    403411        }
    404412
     
    704712        return $field_html;
    705713    }
     714
     715    private static function get_html_timepicker($name, $field, $section, $value){
     716        $props  = self::prepare_field_props($field, $name, $value);
     717        $props .= $field->is_readonly() ? ' data-readonly="yes"' : ' data-readonly="no"';
     718        $input_html = '<input type="text" autocomplete="off" '.$props.' >';
     719
     720        $html = self::prepare_field_html_input($field, $section, $input_html);
     721        return $html;
     722    }
    706723   
    707724}
  • woo-extra-product-options/trunk/languages/woo-extra-product-options.pot

    r3235322 r3280818  
    33msgid ""
    44msgstr ""
    5 "Project-Id-Version: Extra product options For WooCommerce | Custom Product Addons and Fields 3.3.1\n"
     5"Project-Id-Version: Extra product options For WooCommerce | Custom Product Addons and Fields 3.3.2\n"
    66"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/woo-extra-product-options\n"
    77"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
     
    1010"Content-Type: text/plain; charset=UTF-8\n"
    1111"Content-Transfer-Encoding: 8bit\n"
    12 "POT-Creation-Date: 2025-02-04T06:13:23+00:00\n"
     12"POT-Creation-Date: 2025-04-08T05:27:43+00:00\n"
    1313"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
    1414"X-Generator: WP-CLI 2.11.0\n"
     
    3737
    3838#: admin/class-thwepof-admin-form-field.php:27
    39 #: admin/class-thwepof-admin-settings-pro.php:151
     39#: admin/class-thwepof-admin-settings-pro.php:152
    4040msgid "Text"
    4141msgstr ""
    4242
    4343#: admin/class-thwepof-admin-form-field.php:28
    44 #: admin/class-thwepof-admin-settings-pro.php:152
     44#: admin/class-thwepof-admin-settings-pro.php:153
    4545msgid "Hidden"
    4646msgstr ""
     
    4848#: admin/class-thwepof-admin-form-field.php:29
    4949#: admin/class-thwepof-admin-form-field.php:57
     50#: admin/class-thwepof-admin-settings-pro.php:156
     51msgid "Number"
     52msgstr ""
     53
     54#: admin/class-thwepof-admin-form-field.php:30
    5055#: admin/class-thwepof-admin-settings-pro.php:155
    51 msgid "Number"
    52 msgstr ""
    53 
    54 #: admin/class-thwepof-admin-form-field.php:30
     56msgid "Telephone"
     57msgstr ""
     58
     59#: admin/class-thwepof-admin-form-field.php:31
    5560#: admin/class-thwepof-admin-settings-pro.php:154
    56 msgid "Telephone"
    57 msgstr ""
    58 
    59 #: admin/class-thwepof-admin-form-field.php:31
    60 #: admin/class-thwepof-admin-settings-pro.php:153
    6161msgid "Password"
    6262msgstr ""
     
    6464#: admin/class-thwepof-admin-form-field.php:32
    6565#: admin/class-thwepof-admin-form-field.php:56
    66 #: admin/class-thwepof-admin-settings-pro.php:156
     66#: admin/class-thwepof-admin-settings-pro.php:157
    6767msgid "Email"
    6868msgstr ""
     
    7373
    7474#: admin/class-thwepof-admin-form-field.php:34
     75#: admin/class-thwepof-admin-settings-pro.php:160
     76msgid "Slider/Range"
     77msgstr ""
     78
     79#: admin/class-thwepof-admin-form-field.php:35
    7580#: admin/class-thwepof-admin-settings-pro.php:159
    76 msgid "Slider/Range"
    77 msgstr ""
    78 
    79 #: admin/class-thwepof-admin-form-field.php:35
    80 #: admin/class-thwepof-admin-settings-pro.php:158
    8181msgid "Textarea"
    8282msgstr ""
    8383
    8484#: admin/class-thwepof-admin-form-field.php:36
    85 #: admin/class-thwepof-admin-settings-pro.php:162
     85#: admin/class-thwepof-admin-settings-pro.php:163
    8686msgid "Select"
    8787msgstr ""
    8888
    8989#: admin/class-thwepof-admin-form-field.php:37
    90 #: admin/class-thwepof-admin-settings-pro.php:164
     90#: admin/class-thwepof-admin-settings-pro.php:165
    9191msgid "Checkbox"
    9292msgstr ""
    9393
    9494#: admin/class-thwepof-admin-form-field.php:38
    95 #: admin/class-thwepof-admin-settings-pro.php:165
     95#: admin/class-thwepof-admin-settings-pro.php:166
    9696msgid "Checkbox Group"
    9797msgstr ""
     
    102102
    103103#: admin/class-thwepof-admin-form-field.php:40
    104 #: admin/class-thwepof-admin-settings-pro.php:166
     104#: admin/class-thwepof-admin-settings-pro.php:167
    105105msgid "Date Picker"
    106106msgstr ""
     
    111111
    112112#: admin/class-thwepof-admin-form-field.php:42
    113 #: admin/class-thwepof-admin-settings-pro.php:160
     113#: admin/class-thwepof-admin-settings-pro.php:161
    114114msgid "Switch"
    115115msgstr ""
    116116
    117117#: admin/class-thwepof-admin-form-field.php:43
    118 #: admin/class-thwepof-admin-settings-pro.php:174
     118#: admin/class-thwepof-admin-settings-pro.php:175
    119119msgid "Heading"
    120120msgstr ""
     
    125125
    126126#: admin/class-thwepof-admin-form-field.php:45
    127 #: admin/class-thwepof-admin-settings-pro.php:177
     127#: admin/class-thwepof-admin-settings-pro.php:178
    128128msgid "Separator"
    129129msgstr ""
     
    704704
    705705#: admin/class-thwepof-admin-settings-pro.php:83
    706 #: admin/class-thwepof-admin-settings-pro.php:350
     706#: admin/class-thwepof-admin-settings-pro.php:352
    707707msgid "Get Pro"
    708708msgstr ""
     
    712712msgstr ""
    713713
    714 #: admin/class-thwepof-admin-settings-pro.php:157
     714#: admin/class-thwepof-admin-settings-pro.php:158
    715715msgid "URL"
    716716msgstr ""
    717717
    718 #: admin/class-thwepof-admin-settings-pro.php:161
     718#: admin/class-thwepof-admin-settings-pro.php:162
    719719msgid "Radio"
    720720msgstr ""
    721721
    722 #: admin/class-thwepof-admin-settings-pro.php:163
     722#: admin/class-thwepof-admin-settings-pro.php:164
    723723msgid "Multiselect "
    724724msgstr ""
    725725
    726 #: admin/class-thwepof-admin-settings-pro.php:167
     726#: admin/class-thwepof-admin-settings-pro.php:168
    727727msgid "Time Picker"
    728728msgstr ""
    729729
    730 #: admin/class-thwepof-admin-settings-pro.php:168
     730#: admin/class-thwepof-admin-settings-pro.php:169
    731731msgid "Date & Time Range Picker"
    732732msgstr ""
    733733
    734 #: admin/class-thwepof-admin-settings-pro.php:169
     734#: admin/class-thwepof-admin-settings-pro.php:170
    735735msgid "Color Picker"
    736736msgstr ""
    737737
    738 #: admin/class-thwepof-admin-settings-pro.php:170
     738#: admin/class-thwepof-admin-settings-pro.php:171
    739739msgid "Color Palette"
    740740msgstr ""
    741741
    742 #: admin/class-thwepof-admin-settings-pro.php:171
     742#: admin/class-thwepof-admin-settings-pro.php:172
    743743msgid "Image Group"
    744744msgstr ""
    745745
    746 #: admin/class-thwepof-admin-settings-pro.php:172
     746#: admin/class-thwepof-admin-settings-pro.php:173
    747747msgid "Product Group"
    748748msgstr ""
    749749
    750 #: admin/class-thwepof-admin-settings-pro.php:173
     750#: admin/class-thwepof-admin-settings-pro.php:174
    751751msgid "File Upload"
    752752msgstr ""
    753753
    754 #: admin/class-thwepof-admin-settings-pro.php:175
     754#: admin/class-thwepof-admin-settings-pro.php:176
    755755msgid "Paragraph/Label"
    756756msgstr ""
    757757
    758 #: admin/class-thwepof-admin-settings-pro.php:176
     758#: admin/class-thwepof-admin-settings-pro.php:177
    759759msgid "HTML"
     760msgstr ""
     761
     762#: admin/class-thwepof-admin-settings-pro.php:179
     763msgid "Label swatches"
    760764msgstr ""
    761765
  • woo-extra-product-options/trunk/public/assets/js/thwepof-public.min.js

    r2877647 r3280818  
    1 function thwepofViewPassword(elm){thwepof_public.thwepofviewpassword(elm)}function thwepof_init(){thwepof_public.initialize_thwepof()}var thwepof_public=function($,window,document){"use strict";function initialize_thwepof(){setup_date_picker($(".thwepo-extra-options"),"thwepof-date-picker",thwepof_public_var);var wepo_range_input=$('input[type="range"].thwepof-input-field');wepo_range_input.each(function(){display_range_value(this)}),wepo_range_input.on("change",function(){display_range_value(this)}),$(".thwepof-mask-input").each(function(){apply_input_masking(this)})}function setup_date_picker(form,class_selector,data){$("."+class_selector).each(function(){var readonly=$(this).data("readonly");readonly="yes"===readonly;var yearRange=$(this).data("year-range");yearRange=""==yearRange?"-100:+10":yearRange,$(this).datepicker({showButtonPanel:!0,changeMonth:!0,changeYear:!0,yearRange:yearRange}),$(this).prop("readonly",readonly)})}function oceanwp_qv_field_validating_notice(){jQuery("body").off("adding_to_cart").on("adding_to_cart",function(event,addToCartBtn,formData){var $cartForm=$("#owp-qv-content").find("form.cart"),$table=$cartForm.find("table.thwepo-extra-options"),$requiredTrs=$table.find("tr:has(abbr.required)"),$requiredTds=$requiredTrs.find("td.value, td.abovefield"),inputNames=[],reqFields_data=[];$requiredTds.each(function(){$(this).find("input, select, textarea").each(function(){var inputName=$(this).attr("name");if(void 0!==inputName){var $labelTr=$(this).closest("tr"),labelText=$labelTr.find("label.label-tag").text().trim(),ftype="other";$labelTr.has('input[type="email"]').length?ftype="email":$labelTr.has('input[type="url"]').length&&(ftype="url"),inputNames.push(inputName),reqFields_data.push({name:inputName,label:labelText,type:ftype})}})});for(var filteredNames=Array.from(new Set(inputNames)),req_fields=[],i=0;i<filteredNames.length;i++){for(var flag=0,j=0;j<formData.length;j++)formData[j].name==filteredNames[i]&&""!=formData[j].value&&(flag=1);flag||req_fields.push(filteredNames[i])}if(addToCartBtn.hasClass("notincart")&&addToCartBtn.removeClass("notincart"),0!==req_fields.length){for(var reqLabels=[],i=0;i<req_fields.length;i++)for(var j=0;j<reqFields_data.length;j++)if(req_fields[i]==reqFields_data[j].name){reqLabels.push(reqFields_data[j].label);break}1===reqLabels.length?alert(reqLabels+"  is a required field"):alert(reqLabels.join("\n ")+"  - are required fields"),addToCartBtn.removeClass("loading"),addToCartBtn.addClass("notincart")}else{var fields_data=[];$table.find("tr").each(function(){$(this).find('input[type="email"], input[type="url"]').each(function(){var fieldName=$(this).attr("name"),fieldType=$(this).attr("type");fields_data.push({name:fieldName,type:fieldType})})}),0!==fields_data.length&&validate_email_url(fields_data,formData)}})}function validate_email_url(fields_data,formData){for(var i=0;i<fields_data.length;i++)for(var j=0;j<formData.length;j++)if(fields_data[i].name==formData[j].name&&""!=formData[j].value)if("email"==fields_data[i].type){if(!isEmail(formData[j].value))return showMessage("Added email is not valid!"),!1}else if("url"==fields_data[i].type&&!isUrl(formData[j].value))return showMessage("Added URL is not valid!"),!1}function isEmail(value){return/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(value)}function isUrl(value){return/^(ftp|http|https):\/\/[^ "]+$/.test(value)}function showMessage(message){var box=document.createElement("div");box.style.position="fixed",box.style.top="50%",box.style.left="50%",box.style.transform="translate(-50%, -50%)",box.style.padding="20px",box.style.backgroundColor="#fff",box.style.boxShadow="0 0 10px rgba(0, 0, 0, 0.5)",box.style.zIndex=99999;var messageText=document.createElement("p");messageText.style.margin="0",messageText.innerHTML="<span style='color: yellow;'>&#9888;<b>Warning: </b> </span>"+message,box.appendChild(messageText),document.body.appendChild(box),setTimeout(function(){box.style.opacity="0",setTimeout(function(){document.body.removeChild(box)},2e3)},3e3)}function check_oceanwp_quickview_opened(){$("#owp-qv-wrap").hasClass("is-visible")?(initialize_thwepof(),oceanwp_qv_field_validating_notice()):setTimeout(function(){check_oceanwp_quickview_opened()},1e3)}function apply_input_masking(elm){var data=$(elm).data("mask-pattern"),alias_items=["datetime","numeric","cssunit","url","IP","email","mac","vin"];-1!==$.inArray(data,alias_items)?$(elm).inputmask({alias:data}):$(elm).inputmask({mask:data})}function thwepofviewpassword(elm){var icon=$(elm),parent_elm=icon.closest(".thwepof-password-field"),input=parent_elm.find("input");icon.hasClass("dashicons-visibility")?(input.attr("type","text"),icon.addClass("dashicons-hidden").removeClass("dashicons-visibility")):icon.hasClass("dashicons-hidden")&&(input.attr("type","password"),icon.addClass("dashicons-visibility").removeClass("dashicons-hidden"))}function display_range_value(elm){var range_input=$(elm),range_val=range_input.val(),width=range_input.width(),min_attr=range_input.attr("min"),max_attr=range_input.attr("max");const min=min_attr||0,max=max_attr||100,position=Number(100*(range_val-min)/(max-min));var display_div=range_input.siblings(".thwepof-range-val");display_div.html(range_val);var left_position,display_div_width=display_div.innerWidth(),slider_position=width*position/100;left_position=width-slider_position<display_div_width/2?"calc(100% - "+display_div_width+"px)":slider_position<display_div_width/2?"0px":"calc("+position+"% - "+display_div_width/2+"px)",display_div.css("left",left_position)}return initialize_thwepof(),"flatsome"==thwepof_public_var.is_quick_view?$(document).on("mfpOpen",function(){initialize_thwepof(),$.magnificPopup.instance._onFocusIn=function(e){return!!$(e.target).hasClass("ui-datepicker-month")||(!!$(e.target).hasClass("ui-datepicker-year")||void $.magnificPopup.proto._onFocusIn.call(this,e))}}):"yith"==thwepof_public_var.is_quick_view?$(document).on("qv_loader_stop",function(){initialize_thwepof()}):"astra"==thwepof_public_var.is_quick_view?$(document).on("ast_quick_view_loader_stop",function(){initialize_thwepof()}):"oceanwp"==thwepof_public_var.is_quick_view&&$(document).on("click",".owp-quick-view",function(e){check_oceanwp_quickview_opened()}),{initialize_thwepof:initialize_thwepof,thwepofviewpassword:thwepofviewpassword}}(window.jQuery,window,document);
     1function thwepofViewPassword(elm){thwepof_public.thwepofviewpassword(elm)}function thwepof_init(){thwepof_public.initialize_thwepof()}var thwepof_public=function($,window,document){"use strict";function initialize_thwepof(){var extra_options_wrapper=$(".thwepo-extra-options");setup_date_picker(extra_options_wrapper,"thwepof-date-picker",thwepof_public_var),setup_time_picker(extra_options_wrapper,"thwepof-time-picker",thwepof_public_var);var wepo_range_input=$('input[type="range"].thwepof-input-field');wepo_range_input.each(function(){display_range_value(this)}),wepo_range_input.on("change",function(){display_range_value(this)}),$(".thwepof-mask-input").each(function(){apply_input_masking(this)})}function setup_date_picker(form,class_selector,data){$("."+class_selector).each(function(){var readonly=$(this).data("readonly");readonly="yes"===readonly;var yearRange=$(this).data("year-range");yearRange=""==yearRange?"-100:+10":yearRange,$(this).datepicker({showButtonPanel:!0,changeMonth:!0,changeYear:!0,yearRange:yearRange}),$(this).prop("readonly",readonly)})}function setup_time_picker(form,class_selector,data){$("."+class_selector).each(function(){var readonly=$(this).data("readonly");readonly="yes"===readonly;var args={minTime:"12:00am",maxTime:"11:30pm",step:"30",timeFormat:"h:i A",forceRoundTime:!0,disableTextInput:!0,disableTouchKeyboard:!0,lang:data.lang};$(this).timepicker(args),$(this).prop("readonly",readonly)})}function oceanwp_qv_field_validating_notice(){jQuery("body").off("adding_to_cart").on("adding_to_cart",function(event,addToCartBtn,formData){var $cartForm=$("#owp-qv-content").find("form.cart"),$table=$cartForm.find("table.thwepo-extra-options"),$requiredTrs=$table.find("tr:has(abbr.required)"),$requiredTds=$requiredTrs.find("td.value, td.abovefield"),inputNames=[],reqFields_data=[];$requiredTds.each(function(){$(this).find("input, select, textarea").each(function(){var inputName=$(this).attr("name");if(void 0!==inputName){var $labelTr=$(this).closest("tr"),labelText=$labelTr.find("label.label-tag").text().trim(),ftype="other";$labelTr.has('input[type="email"]').length?ftype="email":$labelTr.has('input[type="url"]').length&&(ftype="url"),inputNames.push(inputName),reqFields_data.push({name:inputName,label:labelText,type:ftype})}})});for(var filteredNames=Array.from(new Set(inputNames)),req_fields=[],i=0;i<filteredNames.length;i++){for(var flag=0,j=0;j<formData.length;j++)formData[j].name==filteredNames[i]&&""!=formData[j].value&&(flag=1);flag||req_fields.push(filteredNames[i])}if(addToCartBtn.hasClass("notincart")&&addToCartBtn.removeClass("notincart"),0!==req_fields.length){for(var reqLabels=[],i=0;i<req_fields.length;i++)for(var j=0;j<reqFields_data.length;j++)if(req_fields[i]==reqFields_data[j].name){reqLabels.push(reqFields_data[j].label);break}1===reqLabels.length?alert(reqLabels+"  is a required field"):alert(reqLabels.join("\n ")+"  - are required fields"),addToCartBtn.removeClass("loading"),addToCartBtn.addClass("notincart")}else{var fields_data=[];$table.find("tr").each(function(){$(this).find('input[type="email"], input[type="url"]').each(function(){var fieldName=$(this).attr("name"),fieldType=$(this).attr("type");fields_data.push({name:fieldName,type:fieldType})})}),0!==fields_data.length&&validate_email_url(fields_data,formData)}})}function validate_email_url(fields_data,formData){for(var i=0;i<fields_data.length;i++)for(var j=0;j<formData.length;j++)if(fields_data[i].name==formData[j].name&&""!=formData[j].value)if("email"==fields_data[i].type){if(!isEmail(formData[j].value))return showMessage("Added email is not valid!"),!1}else if("url"==fields_data[i].type&&!isUrl(formData[j].value))return showMessage("Added URL is not valid!"),!1}function isEmail(value){return/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(value)}function isUrl(value){return/^(ftp|http|https):\/\/[^ "]+$/.test(value)}function showMessage(message){var box=document.createElement("div");box.style.position="fixed",box.style.top="50%",box.style.left="50%",box.style.transform="translate(-50%, -50%)",box.style.padding="20px",box.style.backgroundColor="#fff",box.style.boxShadow="0 0 10px rgba(0, 0, 0, 0.5)",box.style.zIndex=99999;var messageText=document.createElement("p");messageText.style.margin="0",messageText.innerHTML="<span style='color: yellow;'>&#9888;<b>Warning: </b> </span>"+message,box.appendChild(messageText),document.body.appendChild(box),setTimeout(function(){box.style.opacity="0",setTimeout(function(){document.body.removeChild(box)},2e3)},3e3)}function check_oceanwp_quickview_opened(){$("#owp-qv-wrap").hasClass("is-visible")?(initialize_thwepof(),oceanwp_qv_field_validating_notice()):setTimeout(function(){check_oceanwp_quickview_opened()},1e3)}function apply_input_masking(elm){var data=$(elm).data("mask-pattern"),alias_items=["datetime","numeric","cssunit","url","IP","email","mac","vin"];-1!==$.inArray(data,alias_items)?$(elm).inputmask({alias:data}):$(elm).inputmask({mask:data})}function thwepofviewpassword(elm){var icon=$(elm),parent_elm=icon.closest(".thwepof-password-field"),input=parent_elm.find("input");icon.hasClass("dashicons-visibility")?(input.attr("type","text"),icon.addClass("dashicons-hidden").removeClass("dashicons-visibility")):icon.hasClass("dashicons-hidden")&&(input.attr("type","password"),icon.addClass("dashicons-visibility").removeClass("dashicons-hidden"))}function display_range_value(elm){var range_input=$(elm),range_val=range_input.val(),width=range_input.width(),min_attr=range_input.attr("min"),max_attr=range_input.attr("max");const min=min_attr||0,max=max_attr||100,position=Number(100*(range_val-min)/(max-min));var display_div=range_input.siblings(".thwepof-range-val");display_div.html(range_val);var left_position,display_div_width=display_div.innerWidth(),slider_position=width*position/100;left_position=width-slider_position<display_div_width/2?"calc(100% - "+display_div_width+"px)":slider_position<display_div_width/2?"0px":"calc("+position+"% - "+display_div_width/2+"px)",display_div.css("left",left_position)}return initialize_thwepof(),"flatsome"==thwepof_public_var.is_quick_view?$(document).on("mfpOpen",function(){initialize_thwepof(),$.magnificPopup.instance._onFocusIn=function(e){return!!$(e.target).hasClass("ui-datepicker-month")||(!!$(e.target).hasClass("ui-datepicker-year")||void $.magnificPopup.proto._onFocusIn.call(this,e))}}):"yith"==thwepof_public_var.is_quick_view?$(document).on("qv_loader_stop",function(){initialize_thwepof()}):"astra"==thwepof_public_var.is_quick_view?$(document).on("ast_quick_view_loader_stop",function(){initialize_thwepof()}):"oceanwp"==thwepof_public_var.is_quick_view&&$(document).on("click",".owp-quick-view",function(e){check_oceanwp_quickview_opened()}),{initialize_thwepof:initialize_thwepof,thwepofviewpassword:thwepofviewpassword}}(window.jQuery,window,document);
  • woo-extra-product-options/trunk/public/class-thwepof-public.php

    r3034429 r3280818  
    3030            wp_enqueue_style('thwepof-public-style', THWEPOF_URL.'public/assets/css/thwepof-public'. $suffix .'.css', THWEPOF_VERSION);
    3131            wp_enqueue_style('jquery-ui-style', THWEPOF_URL.'public/assets/css/jquery-ui/jquery-ui.css');
     32            wp_enqueue_style('jquery-timepicker', THWEPOF_URL.'public/assets/js/timepicker/jquery.timepicker.css');
    3233
    3334            wp_register_script('thwepof-input-mask', THWEPOF_URL.'public/assets/js/inputmask-js/jquery.inputmask.min.js', array('jquery'), THWEPOF_VERSION, true);
    3435            wp_enqueue_script('thwepof-input-mask');
     36
     37            wp_register_script('thwepof-timepicker-script', THWEPOF_URL.'public/assets/js/timepicker/jquery.timepicker.min.js', array('jquery'), THWEPOF_VERSION, true);
     38            wp_enqueue_script('thwepof-timepicker-script');
    3539
    3640            wp_register_script('thwepof-public-script', THWEPOF_URL.'public/assets/js/thwepof-public'. $suffix .'.js', array('jquery', 'jquery-ui-datepicker'), THWEPOF_VERSION, true);
     
    566570        if($extra_options && is_array($extra_options)){
    567571            foreach($extra_options as $name => $field){
    568                 $posted_value = $this->get_posted_value($name);
     572                $type = $field->get_property('type');
     573                $posted_value = $this->get_posted_value($name, $type);
    569574                if($posted_value) {
    570575                    if(is_array($posted_value)){
     
    580585                    $data_arr['name']    = $name;
    581586                    $data_arr['value']   = $posted_value;
    582                     $data_arr['type']    = $field->get_property('type');
     587                    $data_arr['type']    = $type;
    583588                    $data_arr['label']   = $field->get_property('title');
    584589                    $data_arr['options'] = $field->get_property('options');
     
    588593            }
    589594        }
     595
    590596        return $extra_data;
    591597    }
  • woo-extra-product-options/trunk/readme.txt

    r3235322 r3280818  
    22Contributors: ThemeHigh
    33Donate link: https://themehigh.com/
    4 Tags:  extra product options, product addons, woocommerce product fields, product options, woocommerce product addons
     4Tags:  extra product options, product addons, woocommerce product addons, woocommerce product fields, product options
    55Requires at least: 4.9
    6 Tested up to: 6.7
     6Tested up to: 6.8
    77Requires PHP: 5.6
    8 Stable tag: 3.3.1
     8Stable tag: 3.3.2
    99License: GPLv2 or later
    1010License URI: http://www.gnu.org/licenses/gpl-2.0.html
    1111
    12 WooCommerce Extra Product Options plugin lets you add product addons (custom products field) of 19 different field types to your product page.
     12WooCommerce Extra Product Options plugin lets you add product addons (custom products field) of 20 different field types to your product page.
    1313
    1414== Description ==
    1515🔥 **#1 Plugin for adding product addons to WooCommerce Products**
    1616
    17 Transform your WooCommerce product pages with **Extra Product Options for WooCommerce (WooCommerce Product Addons) by ThemeHigh.** With this plugin, you can add up to **19 custom product fields** and offer customised products to your customers effortlessly. With WooCommerce Extra Product Options by ThemeHigh, you can showcase **product add-ons**, easily add multiple custom fields, group similar ones into sections, and display fields based on conditions. Whether you run a small or a large online store, our plugin not only updates your store's functionality but also drives sales growth by 2X. Transform your store today, and watch how your sales grow!
     17Transform your WooCommerce product pages with **Extra Product Options for WooCommerce (WooCommerce Product Addons) by ThemeHigh.** With this plugin, you can add up to **20 custom product fields** and offer customised products to your customers effortlessly. With WooCommerce Extra Product Options by ThemeHigh, you can showcase **product add-ons**, easily add multiple custom fields, group similar ones into sections, and display fields based on conditions. Whether you run a small or a large online store, our plugin not only updates your store's functionality but also drives sales growth by 2X. Transform your store today, and watch how your sales grow!
    1818
    1919== SEE HOW OUR FREE VERSION WORKS ==
     
    3131✳️ **Custom Hooks →** Easily Add more functionalities with developer-friendly Custom Hooks.
    3232
    33 [Try Demo](https://flydemos.com/woodmart-wepo-demo/shop/) | [Documentation](https://www.themehigh.com/docs/category/extra-product-option-for-woocommerce/) | [Get Pro ](https://www.themehigh.com/product/woocommerce-extra-product-options/?utm_source=wepo_free&utm_medium=readme&utm_campaign=wepo_upgrade_link)
    34 
    35 --------------------------------------------
    36 https://www.youtube.com/watch?v=YoVPQhdwuis
    37 --------------------------------------------
    38 
    39 = ✅  ADD 19 ADVANCED PRODUCT FIELDS TO PRODUCT PAGE =
     33[Try Demo](https://flydemos.com/woodmart-wepo-demo/shop/) | [Documentation](https://www.themehigh.com/docs/category/extra-product-option-for-woocommerce/?utm_source=wepo_free&utm_medium=readme&utm_campaign=wepo_help_doc) | [Get Pro ](https://www.themehigh.com/product/woocommerce-extra-product-options/?utm_source=wepo_free&utm_medium=readme&utm_campaign=wepo_upgrade_link)
     34
     35= ✅  ADD 20 ADVANCED PRODUCT FIELDS TO PRODUCT PAGE =
    4036
    41371.  Text
     
    585418. Switch
    595519. Separator
     5620. Time Picker 🆕
    6057
    6158= ✅ GROUP RELATED PRODUCT FIELDS INTO CUSTOM SECTIONS & DISPLAY IN 2 POSITIONS =
     
    107104
    108105== 🔥 SEE  OUR  PREMIUM FEATURES ==
    109 [Use-case Demo](https://flydemos.com/wepo/?utm_source=wepo_free&utm_medium=readme&utm_campaign=try_demo) | [Documentation](https://www.themehigh.com/docs/category/extra-product-option-for-woocommerce/) | [Get Pro](https://www.themehigh.com/product/woocommerce-extra-product-options/?utm_source=wepo_free&utm_medium=readme&utm_campaign=wepo_upgrade_link)
     106[Use-case Demo](https://flydemos.com/wepo/?utm_source=wepo_free&utm_medium=readme&utm_campaign=try_demo) | [Documentation](https://www.themehigh.com/docs/category/extra-product-option-for-woocommerce/?utm_source=wepo_free&utm_medium=readme&utm_campaign=wepo_help_doc) | [Get Pro](https://www.themehigh.com/product/woocommerce-extra-product-options/?utm_source=wepo_free&utm_medium=readme&utm_campaign=wepo_upgrade_link)
    110107
    111108= ✅  ADD 8 ADDITIONAL PRODUCT FIELDS =
    112109
    113110    1.  Multi-select
    114     2.  Time Picker
    115     3.  File Upload
    116     4.  HTML
    117     5.  Color Palette
    118     6.  Image Group
    119     7.  Date & Time Range Picker
    120     8.  Product Group
     111    2.  File Upload
     112    3.  HTML
     113    4.  Color Palette
     114    5.  Image Group
     115    6.  Date & Time Range Picker
     116    7.  Product Group
     117    8.  Label Swatches 🆕
    121118
    122119= ✅ 5 EXTRA CONDITIONS TO DEFINE  DISPLAY RULES  =
     
    160157
    161158Confirm Validator allows you to validate two fields for the same value (for example, Email and Confirm Email).
     159
     160 =  ✅ EDIT FROM CART FUNCTIONALITY 🆕 =
     161You can edit all the fields you have added using this plugin from the cart
    162162
    163163== Why ThemeHigh ==
     
    195195== OTHER USEFUL LINKS ==
    196196👉 [VIEW ALL FEATURES](https://www.themehigh.com/product/woocommerce-extra-product-options/?utm_source=wepo_free&utm_medium=readme&utm_campaign=wepo_upgrade_link)
    197 👉 [GET DOCUMENTATION](https://www.themehigh.com/docs/category/extra-product-option-for-woocommerce/)
    198 👉 [GET THEMEHIGH SUPPORT](https://www.themehigh.com/docs/support/)
     197👉 [GET DOCUMENTATION](https://www.themehigh.com/docs/category/extra-product-option-for-woocommerce/?utm_source=wepo_free&utm_medium=readme&utm_campaign=wepo_help_doc)
     198👉 [GET THEMEHIGH SUPPORT](https://www.themehigh.com/docs/support/?utm_source=wpvs_free&utm_medium=readme&utm_campaign=wepo_support)
    199199👉 [JOIN COMMUNITY](https://www.facebook.com/groups/themehigh/)
    200200👉 FOLLOW US ON [Facebook](https://www.facebook.com/ThemeHigh-319611541768603/), [LinkedIn](https://www.linkedin.com/company/themehigh/), [Twitter](https://twitter.com/themehigh/) & [YouTube](https://www.youtube.com/channel/UC-_uMXaC_21j1Y2_nGjTyvg/).
     
    303303== Changelog ==
    304304
    305 = 3.3.1 =
    306 * Added WooCommerce 9.6 compatibility.
     305= 3.3.2 =
     306* Added new field type **Time Picker**.
     307* Added WooCommerce 9.8 compatibility.
     308* Added WordPress 6.8 compatibility.
  • woo-extra-product-options/trunk/woo-extra-product-options.php

    r3235322 r3280818  
    44 * Description: Add extra product options in product page.
    55 * Author:      ThemeHigh
    6  * Version:     3.3.1
     6 * Version:     3.3.2
    77 * Author URI:  https://www.themehigh.com
    88 * Plugin URI:  https://www.themehigh.com
     
    1111 * Requires Plugins: woocommerce
    1212 * WC requires at least: 3.0.0
    13  * WC tested up to: 9.6
     13 * WC tested up to: 9.8
    1414 */
    1515
     
    3636
    3737            public function init() {
    38                 define('THWEPOF_VERSION', '3.3.1');
     38                define('THWEPOF_VERSION', '3.3.2');
    3939                !defined('THWEPOF_BASE_NAME') && define('THWEPOF_BASE_NAME', plugin_basename( __FILE__ ));
    4040                !defined('THWEPOF_PATH') && define('THWEPOF_PATH', plugin_dir_path( __FILE__ ));
Note: See TracChangeset for help on using the changeset viewer.