Plugin Directory

Changeset 3297334


Ignore:
Timestamp:
05/20/2025 11:49:11 AM (10 months ago)
Author:
webtonative
Message:

Deploy plugin version 2.8.2

Location:
webtonative/trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • webtonative/trunk/README.md

    r3296993 r3297334  
    44Requires at least: 2.0.2
    55Tested up to: 6.7.1
    6 Stable tag: 2.8.1
     6Stable tag: 2.8.2
    77License: GPLv2 or later
    88
  • webtonative/trunk/index.php

    r3296993 r3297334  
    33  Plugin Name: webtonative
    44  Description: webtonative Plugin
    5   Version: 2.8.1
     5  Version: 2.8.2
    66  Author: webtonative
    77*/
  • webtonative/trunk/offer-card/webtonative-offercard.php

    r3296993 r3297334  
    2222{
    2323    $defaults = array(
    24         'action_url' => 'https://www.webtonative.com',
     24        'action_url' => '',
    2525        'button_text_color' => '#FFFFFF',
    2626        'button_bg_color' => '#111111',
    27         'button_text' => 'WebToNative',
     27        'button_text' => '',
    2828        'card_size' => 'SMALL', // SMALL | FULL_SCREEN | FULL_WIDTH   (required)
    2929        'card_position' => 'RIGHT', // LEFT | RIGHT (SMALL size card position default position right) (Has no impact in case of FULL_SCREEN | FULL_WIDTH )
     
    3131        'content_type' => 'IMAGE', // IMAGE | VIDEO
    3232        'content_url' => 'https://wallpaperaccess.com/full/2083830.jpg',
    33         'id' => '',
    34         'schedule_duration' => 9,
     33        'id' => null,
     34        'schedule_duration' => 0,
    3535        'schedule_unit' => 'minutes' // minutes | hours | days
    3636    );
     
    3838    // Merge global settings with shortcode attributes
    3939    $options = shortcode_atts($defaults, $atts);
     40
     41    $id_value = $options['id'] === '' ? 'null' : '"' . esc_attr($options['id']) . '"';
    4042
    4143    $output = '<div id="wtn-offercard"></div>';
     
    5456                    }
    5557                },
    56                 id: "' . esc_attr($options['id']) . '",
     58                id: ' . $id_value . '.trim() ? ' . $id_value . '.trim() : null,
    5759                card: {
    5860                    size: "' . esc_attr($options['card_size']) . '",
  • webtonative/trunk/website/iap.php

    r3296993 r3297334  
    2121    $webtonative_settings = get_option('woocommerce_webtonative_settings');
    2222
    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);
    2424    wp_localize_script('webtonative-iap', 'wtn_biometric_settings', array(
    2525      'btn_proccessing_text' => $saved_settings['processing_button_text'],
  • webtonative/trunk/website/scripts/woocommerce.js

    r3296993 r3297334  
     1function debounce(func, wait) {
     2  let timeout;
     3  return function (...args) {
     4    clearTimeout(timeout);
     5    timeout = setTimeout(() => func.apply(this, args), wait);
     6  };
     7}
     8
    19(async function ($) {
    210  if (!WTN.isAndroidApp && !WTN.isIosApp) return;
     
    1321  const btnTexts = {
    1422    buyNow: wtn_biometric_settings?.btn_buy_now_text ?? 'Buy Now',
    15     processing: wtn_biometric_settings?.btn_processing_text ?? 'Processing...',
     23    processing: wtn_biometric_settings?.btn_proccessing_text ?? 'Processing...',
    1624    success: wtn_biometric_settings?.btn_payment_completed_text ?? 'Payment completed',
    1725    failed: wtn_biometric_settings?.btn_failed_text ?? 'Payment failed',
     
    112120    const productList = await fetchProductList();
    113121
    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 () {
    115123      const button = $(this);
    116124      const productId = button.data('product_id') || button.val();
     
    119127      if (nativeProductId) {
    120128        const existingClasses = button.attr('class').replace('ajax_add_to_cart', '') || '';
    121         const newButton = $('<button>')
     129        const newButton = $('<button type="button">')
    122130          .addClass(`${existingClasses} webtonative-iap`)
    123131          .text(btnTexts.buyNow)
     
    158166  // Initialize
    159167  await setupButtons();
     168
     169  $(document).ajaxComplete(async function () {
     170    debounce(setupButtons, 300)();
     171  });
    160172})(jQuery);
Note: See TracChangeset for help on using the changeset viewer.