Changeset 3297334
- Timestamp:
- 05/20/2025 11:49:11 AM (10 months ago)
- Location:
- webtonative/trunk
- Files:
-
- 5 edited
-
README.md (modified) (1 diff)
-
index.php (modified) (1 diff)
-
offer-card/webtonative-offercard.php (modified) (4 diffs)
-
website/iap.php (modified) (1 diff)
-
website/scripts/woocommerce.js (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
webtonative/trunk/README.md
r3296993 r3297334 4 4 Requires at least: 2.0.2 5 5 Tested up to: 6.7.1 6 Stable tag: 2.8. 16 Stable tag: 2.8.2 7 7 License: GPLv2 or later 8 8 -
webtonative/trunk/index.php
r3296993 r3297334 3 3 Plugin Name: webtonative 4 4 Description: webtonative Plugin 5 Version: 2.8. 15 Version: 2.8.2 6 6 Author: webtonative 7 7 */ -
webtonative/trunk/offer-card/webtonative-offercard.php
r3296993 r3297334 22 22 { 23 23 $defaults = array( 24 'action_url' => ' https://www.webtonative.com',24 'action_url' => '', 25 25 'button_text_color' => '#FFFFFF', 26 26 'button_bg_color' => '#111111', 27 'button_text' => ' WebToNative',27 'button_text' => '', 28 28 'card_size' => 'SMALL', // SMALL | FULL_SCREEN | FULL_WIDTH (required) 29 29 'card_position' => 'RIGHT', // LEFT | RIGHT (SMALL size card position default position right) (Has no impact in case of FULL_SCREEN | FULL_WIDTH ) … … 31 31 'content_type' => 'IMAGE', // IMAGE | VIDEO 32 32 'content_url' => 'https://wallpaperaccess.com/full/2083830.jpg', 33 'id' => '',34 'schedule_duration' => 9,33 'id' => null, 34 'schedule_duration' => 0, 35 35 'schedule_unit' => 'minutes' // minutes | hours | days 36 36 ); … … 38 38 // Merge global settings with shortcode attributes 39 39 $options = shortcode_atts($defaults, $atts); 40 41 $id_value = $options['id'] === '' ? 'null' : '"' . esc_attr($options['id']) . '"'; 40 42 41 43 $output = '<div id="wtn-offercard"></div>'; … … 54 56 } 55 57 }, 56 id: "' . esc_attr($options['id']) . '",58 id: ' . $id_value . '.trim() ? ' . $id_value . '.trim() : null, 57 59 card: { 58 60 size: "' . esc_attr($options['card_size']) . '", -
webtonative/trunk/website/iap.php
r3296993 r3297334 21 21 $webtonative_settings = get_option('woocommerce_webtonative_settings'); 22 22 23 wp_register_script('webtonative-iap', plugins_url('scripts/woocommerce.js?var=6.13. 0', __FILE__), array('webtonative', 'jquery'), filemtime(plugin_dir_path(__FILE__) . 'scripts/woocommerce.js'), true);23 wp_register_script('webtonative-iap', plugins_url('scripts/woocommerce.js?var=6.13.10', __FILE__), array('webtonative', 'jquery'), filemtime(plugin_dir_path(__FILE__) . 'scripts/woocommerce.js'), true); 24 24 wp_localize_script('webtonative-iap', 'wtn_biometric_settings', array( 25 25 'btn_proccessing_text' => $saved_settings['processing_button_text'], -
webtonative/trunk/website/scripts/woocommerce.js
r3296993 r3297334 1 function debounce(func, wait) { 2 let timeout; 3 return function (...args) { 4 clearTimeout(timeout); 5 timeout = setTimeout(() => func.apply(this, args), wait); 6 }; 7 } 8 1 9 (async function ($) { 2 10 if (!WTN.isAndroidApp && !WTN.isIosApp) return; … … 13 21 const btnTexts = { 14 22 buyNow: wtn_biometric_settings?.btn_buy_now_text ?? 'Buy Now', 15 processing: wtn_biometric_settings?.btn_proc essing_text ?? 'Processing...',23 processing: wtn_biometric_settings?.btn_proccessing_text ?? 'Processing...', 16 24 success: wtn_biometric_settings?.btn_payment_completed_text ?? 'Payment completed', 17 25 failed: wtn_biometric_settings?.btn_failed_text ?? 'Payment failed', … … 112 120 const productList = await fetchProductList(); 113 121 114 $('.single_add_to_cart_button, .add_to_cart_button ').each(function () {122 $('.single_add_to_cart_button, .add_to_cart_button, .tutor-add-to-cart-button').each(function () { 115 123 const button = $(this); 116 124 const productId = button.data('product_id') || button.val(); … … 119 127 if (nativeProductId) { 120 128 const existingClasses = button.attr('class').replace('ajax_add_to_cart', '') || ''; 121 const newButton = $('<button >')129 const newButton = $('<button type="button">') 122 130 .addClass(`${existingClasses} webtonative-iap`) 123 131 .text(btnTexts.buyNow) … … 158 166 // Initialize 159 167 await setupButtons(); 168 169 $(document).ajaxComplete(async function () { 170 debounce(setupButtons, 300)(); 171 }); 160 172 })(jQuery);
Note: See TracChangeset
for help on using the changeset viewer.