Plugin Directory

Changeset 3191127


Ignore:
Timestamp:
11/18/2024 10:54:43 AM (15 months ago)
Author:
tradetracker
Message:

Fixed tracking script for zero-priced products

Location:
tradetracker-connect
Files:
6 edited
8 copied

Legend:

Unmodified
Added
Removed
  • tradetracker-connect/tags/2.2.11/README.md

    r3177883 r3191127  
    44Requires at least: 5.5
    55Requires PHP: 7.4
    6 Tested up to: 6.5
    7 Stable tag: 2.2.10
     6Tested up to: 6.7
     7Stable tag: 2.2.11
    88License: GPLv3 or later
    99
     
    9090
    9191== Changelog ==
     92= 2.2.11 =
     93- Fixed tracking script for zero-priced products
     94
    9295= 2.2.10 =
    9396- Added temporary file for product feed generation
  • tradetracker-connect/tags/2.2.11/README.txt

    r3177883 r3191127  
    44Requires at least: 5.5
    55Requires PHP: 7.4
    6 Tested up to: 6.5
    7 Stable tag: 2.2.10
     6Tested up to: 6.7
     7Stable tag: 2.2.11
    88License: GPLv3 or later
    99
     
    9090
    9191== Changelog ==
     92= 2.2.11 =
     93- Fixed tracking script for zero-priced products
     94
    9295= 2.2.10 =
    9396- Added temporary file for product feed generation
  • tradetracker-connect/tags/2.2.11/includes/class-tradetracker-connect-xml.php

    r3177883 r3191127  
    2525    }
    2626
    27     public function saveXML(?string $filename = null)
     27    public function saveXML($filename = null)
    2828    {
    2929        $this->_set_product_count();
  • tradetracker-connect/tags/2.2.11/public/class-tradetracker-connect-public.php

    r3116933 r3191127  
    278278        $product_item->currency = htmlentities($order_item->get_order()->get_currency(), ENT_QUOTES);
    279279        $product_item->quantity = $order_item->get_quantity();
    280         $product_item->product_price_cents = $product->get_price() * 100;
    281         $product_item->product_price_ex_tax_cents = $order_item->get_subtotal() > 0 ? ($order_item->get_subtotal() * 100) / $product_item->quantity : 0;
    282         $product_item->product_tax_cents = $order_item->get_subtotal_tax() > 0 ? ($order_item->get_subtotal_tax() * 100) / $product_item->quantity : 0;
     280        $product_item->product_price_cents = is_numeric($product->get_price()) ? round((float) $product->get_price() * 100) : 0;
     281        $product_item->product_price_ex_tax_cents = is_numeric($order_item->get_subtotal()) && $product_item->quantity > 0 ? round((float) $order_item->get_subtotal() * 100 / $product_item->quantity) : 0;
     282        $product_item->product_tax_cents = is_numeric($order_item->get_subtotal_tax()) && $product_item->quantity > 0 ? round((float) $order_item->get_subtotal_tax() * 100 / $product_item->quantity) : 0;
    283283
    284284        $brand_terms = get_the_terms($order_item->get_product_id(), 'pa_brand');
  • tradetracker-connect/tags/2.2.11/tradetracker-connect.php

    r3177883 r3191127  
    1515 * Plugin Name:       TradeTracker Connect
    1616 * Description:       Seamless WordPress integration for TradeTracker's Merchants.
    17  * Version:           2.2.10
     17 * Version:           2.2.11
    1818 * Author:            TradeTracker.com
    1919 * Author URI:        https://tradetracker.com
     
    3636 * Rename this for your plugin and update it as you release new versions.
    3737 */
    38 define('TRADETRACKER_CONNECT_VERSION', '2.2.10');
     38define('TRADETRACKER_CONNECT_VERSION', '2.2.11');
    3939define('TRADETRACKER_CONNECT_URL', plugin_dir_url(__FILE__));
    4040define('TRADETRACKER_CONNECT_PATH', plugin_dir_path(__FILE__));
  • tradetracker-connect/trunk/README.md

    r3177883 r3191127  
    44Requires at least: 5.5
    55Requires PHP: 7.4
    6 Tested up to: 6.5
    7 Stable tag: 2.2.10
     6Tested up to: 6.7
     7Stable tag: 2.2.11
    88License: GPLv3 or later
    99
     
    9090
    9191== Changelog ==
     92= 2.2.11 =
     93- Fixed tracking script for zero-priced products
     94
    9295= 2.2.10 =
    9396- Added temporary file for product feed generation
  • tradetracker-connect/trunk/README.txt

    r3177883 r3191127  
    44Requires at least: 5.5
    55Requires PHP: 7.4
    6 Tested up to: 6.5
    7 Stable tag: 2.2.10
     6Tested up to: 6.7
     7Stable tag: 2.2.11
    88License: GPLv3 or later
    99
     
    9090
    9191== Changelog ==
     92= 2.2.11 =
     93- Fixed tracking script for zero-priced products
     94
    9295= 2.2.10 =
    9396- Added temporary file for product feed generation
  • tradetracker-connect/trunk/includes/class-tradetracker-connect-xml.php

    r3177883 r3191127  
    2525    }
    2626
    27     public function saveXML(?string $filename = null)
     27    public function saveXML($filename = null)
    2828    {
    2929        $this->_set_product_count();
  • tradetracker-connect/trunk/public/class-tradetracker-connect-public.php

    r3116933 r3191127  
    278278        $product_item->currency = htmlentities($order_item->get_order()->get_currency(), ENT_QUOTES);
    279279        $product_item->quantity = $order_item->get_quantity();
    280         $product_item->product_price_cents = $product->get_price() * 100;
    281         $product_item->product_price_ex_tax_cents = $order_item->get_subtotal() > 0 ? ($order_item->get_subtotal() * 100) / $product_item->quantity : 0;
    282         $product_item->product_tax_cents = $order_item->get_subtotal_tax() > 0 ? ($order_item->get_subtotal_tax() * 100) / $product_item->quantity : 0;
     280        $product_item->product_price_cents = is_numeric($product->get_price()) ? round((float) $product->get_price() * 100) : 0;
     281        $product_item->product_price_ex_tax_cents = is_numeric($order_item->get_subtotal()) && $product_item->quantity > 0 ? round((float) $order_item->get_subtotal() * 100 / $product_item->quantity) : 0;
     282        $product_item->product_tax_cents = is_numeric($order_item->get_subtotal_tax()) && $product_item->quantity > 0 ? round((float) $order_item->get_subtotal_tax() * 100 / $product_item->quantity) : 0;
    283283
    284284        $brand_terms = get_the_terms($order_item->get_product_id(), 'pa_brand');
  • tradetracker-connect/trunk/tradetracker-connect.php

    r3177883 r3191127  
    1515 * Plugin Name:       TradeTracker Connect
    1616 * Description:       Seamless WordPress integration for TradeTracker's Merchants.
    17  * Version:           2.2.10
     17 * Version:           2.2.11
    1818 * Author:            TradeTracker.com
    1919 * Author URI:        https://tradetracker.com
     
    3636 * Rename this for your plugin and update it as you release new versions.
    3737 */
    38 define('TRADETRACKER_CONNECT_VERSION', '2.2.10');
     38define('TRADETRACKER_CONNECT_VERSION', '2.2.11');
    3939define('TRADETRACKER_CONNECT_URL', plugin_dir_url(__FILE__));
    4040define('TRADETRACKER_CONNECT_PATH', plugin_dir_path(__FILE__));
Note: See TracChangeset for help on using the changeset viewer.