Plugin Directory

Changeset 3087820


Ignore:
Timestamp:
05/16/2024 01:34:17 PM (23 months ago)
Author:
thrivedesk
Message:

Update to version 2.0.3 from GitHub

Location:
thrivedesk
Files:
12 edited
1 copied

Legend:

Unmodified
Added
Removed
  • thrivedesk/tags/2.0.3/includes/views/partials/integrations.php

    r3049145 r3087820  
    4242    ],
    4343    [
    44         'namespace'   => 'wp-marketing-automations',
     44        'namespace'   => 'autonami',
    4545        'name'        => __( 'FunnelKit', 'thrivedesk' ),
    4646        'image'       => 'autonami.png',
  • thrivedesk/tags/2.0.3/readme.txt

    r3061863 r3087820  
    44Requires at least: 4.9
    55Tested up to: 6.4
    6 Stable Tag: 2.0.2
     6Stable Tag: 2.0.3
    77Requires PHP: 5.5
    88License: GNU General Public License v2.0 or later
     
    233233
    234234== Changelog ==
     235= 2.0.3 =
     236- Fix: WooCommerce product data missing issue   
     237- Fix : FunnelKit namespace issue
     238
    235239= 2.0.2 =
    236240- Update: Enhanced WooCommerce integration 
  • thrivedesk/tags/2.0.3/src/Api.php

    r3010934 r3087820  
    228228        foreach ( $products as $product_id ) {
    229229            $product = wc_get_product( $product_id );
     230            $thumbnail_id = get_post_thumbnail_id( $product_id );
     231            $image_src_array = [];
     232
     233            if( $thumbnail_id){
     234                $image_src_array = wp_get_attachment_image_src( $thumbnail_id );
     235            }
    230236
    231237            $productInfo = array(
     
    233239                "title"             => $product->get_name(),
    234240                "product_permalink" => get_permalink( $product_id ),
    235                 "image"             => wp_get_attachment_image_src( get_post_thumbnail_id( $product_id ) )[0],
     241                "image"             =>  is_array( $image_src_array ) && ! empty( $image_src_array ) ? $image_src_array[0] : '',
    236242                "sale_price"        => get_woocommerce_currency_symbol() . $product->get_regular_price(),
    237243                "stock"             => ( 'instock' === $product->get_stock_status() ) ? 'In Stock' : 'Out of Stock',
     
    271277        $item->set_subtotal( $product->price ?? 0 );
    272278        $item->set_total( $product->price * $this->quantity ?? 0 );
     279       
     280        // if(is_plugin_active('wt-woocommerce-sequential-order-numbers-pro/wt-advanced-order-number-pro.php'))
     281        // {
     282        //  if customer use this type of plugin, wc doesn't have the same order number as the plugin.
     283        // }
     284
    273285        $order = wc_get_order( $order_id );
    274286        $order->add_item( $item );
  • thrivedesk/tags/2.0.3/src/Plugins/WooCommerce.php

    r3061863 r3087820  
    343343
    344344        foreach ( $items as $item ) {
    345            
    346             $product_id = $item->get_variation_id() ?? $item->get_product_id(); 
     345            $productInfo = [];         
     346            $product_id = $item->get_variation_id() ? $item->get_variation_id() : $item->get_product_id(); 
    347347            $product = wc_get_product($product_id);
    348348
     
    358358                ];
    359359            }
    360 
    361             $productInfo = array(
    362                 "product_id"        => $product_id,
    363                 "title"             => $product->get_name(),
    364                 "product_permalink" => get_permalink($product_id),
    365                 "quantity"          => $item["quantity"],
    366                 "total_tax"         => $this->get_formated_amount( (float) $item["total_tax"] ),
    367                 "image"             => wp_get_attachment_image_src( get_post_thumbnail_id($product_id) )[0],
    368                 "type"              => $product->get_type(),
    369                 "status"            => $product->get_status(),
    370                 "sku"               => $product->get_sku(),
    371                 "price"             => $this->get_formated_amount( (float) $item["subtotal"] ),
    372                 "regular_price"     => $this->get_formated_amount( (float) $product->get_regular_price() ),
    373                 "sale_price"        => $this->get_formated_amount( (float) $product->get_sale_price() ),
    374                 "tax_status"        => $product->get_tax_status(),
    375                 "stock"             => $product->get_stock_quantity(),
    376                 "stock_status"      => $product->get_stock_status(),
    377                 "weight"            => $product->get_weight(),
    378                 "discount"          => $this->get_formated_amount( (float) $item->get_total() ),
    379                 "subscription"      => $subscription_info,
    380 
    381             );
    382 
    383             $subscription_info = [];
    384 
    385             if ( array_key_exists( $item->get_id(), $license_info ) ) {
    386                 $productInfo['license'] = $license_info[ $item->get_id() ];
     360           
     361            if($product){
     362                $productInfo = array(
     363                    "product_id"        => $product_id,
     364                    "title"             => $product->get_name(),
     365                    "product_permalink" => get_permalink($product_id),
     366                    "quantity"          => $item["quantity"],
     367                    "total_tax"         => $this->get_formated_amount( (float) $item["total_tax"] ),
     368                    "image"             => wp_get_attachment_image_src( get_post_thumbnail_id($product_id) )[0],
     369                    "type"              => $product->get_type(),
     370                    "status"            => $product->get_status(),
     371                    "sku"               => $product->get_sku(),
     372                    "price"             => $this->get_formated_amount( (float) $item["subtotal"] ),
     373                    "regular_price"     => $this->get_formated_amount( (float) $product->get_regular_price() ),
     374                    "sale_price"        => $this->get_formated_amount( (float) $product->get_sale_price() ),
     375                    "tax_status"        => $product->get_tax_status(),
     376                    "stock"             => $product->get_stock_quantity(),
     377                    "stock_status"      => $product->get_stock_status(),
     378                    "weight"            => $product->get_weight(),
     379                    "discount"          => $this->get_formated_amount( (float) $item->get_total() ),
     380                    "subscription"      => $subscription_info,
     381                );
     382
     383                $subscription_info = [];
     384
     385                if ( array_key_exists( $item->get_id(), $license_info ) ) {
     386                    $productInfo['license'] = $license_info[ $item->get_id() ];
     387                }
    387388            }
    388389
  • thrivedesk/tags/2.0.3/thrivedesk.php

    r3061863 r3087820  
    66 * Plugin URI:          https://www.thrivedesk.com/?utm_source=wp-plugins&utm_campaign=plugin-uri&utm_medium=wp-dash
    77 * Tags:                live chat, helpdesk, free live chat, knowledge base, thrivedesk
    8  * Version:             2.0.2
     8 * Version:             2.0.3
    99 * Author:              ThriveDesk
    1010 * Author URI:          https://profiles.wordpress.org/thrivedesk/
     
    5252     * @var string
    5353     */
    54     public $version = '2.0.2';
     54    public $version = '2.0.3';
    5555
    5656    /**
  • thrivedesk/tags/2.0.3/vendor/composer/installed.php

    r3061863 r3087820  
    22    'root' => array(
    33        'name' => 'thrivedesk/wp-plugin',
    4         'pretty_version' => 'v2.0.2',
    5         'version' => '2.0.2.0',
    6         'reference' => 'cc83b2cb8dc6fb7a35d094e1f836c4ec0b17e176',
     4        'pretty_version' => 'v2.0.3',
     5        'version' => '2.0.3.0',
     6        'reference' => 'e5402191901617864770eb74fce649bc696765b3',
    77        'type' => 'library',
    88        'install_path' => __DIR__ . '/../../',
     
    1212    'versions' => array(
    1313        'thrivedesk/wp-plugin' => array(
    14             'pretty_version' => 'v2.0.2',
    15             'version' => '2.0.2.0',
    16             'reference' => 'cc83b2cb8dc6fb7a35d094e1f836c4ec0b17e176',
     14            'pretty_version' => 'v2.0.3',
     15            'version' => '2.0.3.0',
     16            'reference' => 'e5402191901617864770eb74fce649bc696765b3',
    1717            'type' => 'library',
    1818            'install_path' => __DIR__ . '/../../',
  • thrivedesk/trunk/includes/views/partials/integrations.php

    r3049145 r3087820  
    4242    ],
    4343    [
    44         'namespace'   => 'wp-marketing-automations',
     44        'namespace'   => 'autonami',
    4545        'name'        => __( 'FunnelKit', 'thrivedesk' ),
    4646        'image'       => 'autonami.png',
  • thrivedesk/trunk/readme.txt

    r3061863 r3087820  
    44Requires at least: 4.9
    55Tested up to: 6.4
    6 Stable Tag: 2.0.2
     6Stable Tag: 2.0.3
    77Requires PHP: 5.5
    88License: GNU General Public License v2.0 or later
     
    233233
    234234== Changelog ==
     235= 2.0.3 =
     236- Fix: WooCommerce product data missing issue   
     237- Fix : FunnelKit namespace issue
     238
    235239= 2.0.2 =
    236240- Update: Enhanced WooCommerce integration 
  • thrivedesk/trunk/src/Api.php

    r3010934 r3087820  
    228228        foreach ( $products as $product_id ) {
    229229            $product = wc_get_product( $product_id );
     230            $thumbnail_id = get_post_thumbnail_id( $product_id );
     231            $image_src_array = [];
     232
     233            if( $thumbnail_id){
     234                $image_src_array = wp_get_attachment_image_src( $thumbnail_id );
     235            }
    230236
    231237            $productInfo = array(
     
    233239                "title"             => $product->get_name(),
    234240                "product_permalink" => get_permalink( $product_id ),
    235                 "image"             => wp_get_attachment_image_src( get_post_thumbnail_id( $product_id ) )[0],
     241                "image"             =>  is_array( $image_src_array ) && ! empty( $image_src_array ) ? $image_src_array[0] : '',
    236242                "sale_price"        => get_woocommerce_currency_symbol() . $product->get_regular_price(),
    237243                "stock"             => ( 'instock' === $product->get_stock_status() ) ? 'In Stock' : 'Out of Stock',
     
    271277        $item->set_subtotal( $product->price ?? 0 );
    272278        $item->set_total( $product->price * $this->quantity ?? 0 );
     279       
     280        // if(is_plugin_active('wt-woocommerce-sequential-order-numbers-pro/wt-advanced-order-number-pro.php'))
     281        // {
     282        //  if customer use this type of plugin, wc doesn't have the same order number as the plugin.
     283        // }
     284
    273285        $order = wc_get_order( $order_id );
    274286        $order->add_item( $item );
  • thrivedesk/trunk/src/Plugins/WooCommerce.php

    r3061863 r3087820  
    343343
    344344        foreach ( $items as $item ) {
    345            
    346             $product_id = $item->get_variation_id() ?? $item->get_product_id(); 
     345            $productInfo = [];         
     346            $product_id = $item->get_variation_id() ? $item->get_variation_id() : $item->get_product_id(); 
    347347            $product = wc_get_product($product_id);
    348348
     
    358358                ];
    359359            }
    360 
    361             $productInfo = array(
    362                 "product_id"        => $product_id,
    363                 "title"             => $product->get_name(),
    364                 "product_permalink" => get_permalink($product_id),
    365                 "quantity"          => $item["quantity"],
    366                 "total_tax"         => $this->get_formated_amount( (float) $item["total_tax"] ),
    367                 "image"             => wp_get_attachment_image_src( get_post_thumbnail_id($product_id) )[0],
    368                 "type"              => $product->get_type(),
    369                 "status"            => $product->get_status(),
    370                 "sku"               => $product->get_sku(),
    371                 "price"             => $this->get_formated_amount( (float) $item["subtotal"] ),
    372                 "regular_price"     => $this->get_formated_amount( (float) $product->get_regular_price() ),
    373                 "sale_price"        => $this->get_formated_amount( (float) $product->get_sale_price() ),
    374                 "tax_status"        => $product->get_tax_status(),
    375                 "stock"             => $product->get_stock_quantity(),
    376                 "stock_status"      => $product->get_stock_status(),
    377                 "weight"            => $product->get_weight(),
    378                 "discount"          => $this->get_formated_amount( (float) $item->get_total() ),
    379                 "subscription"      => $subscription_info,
    380 
    381             );
    382 
    383             $subscription_info = [];
    384 
    385             if ( array_key_exists( $item->get_id(), $license_info ) ) {
    386                 $productInfo['license'] = $license_info[ $item->get_id() ];
     360           
     361            if($product){
     362                $productInfo = array(
     363                    "product_id"        => $product_id,
     364                    "title"             => $product->get_name(),
     365                    "product_permalink" => get_permalink($product_id),
     366                    "quantity"          => $item["quantity"],
     367                    "total_tax"         => $this->get_formated_amount( (float) $item["total_tax"] ),
     368                    "image"             => wp_get_attachment_image_src( get_post_thumbnail_id($product_id) )[0],
     369                    "type"              => $product->get_type(),
     370                    "status"            => $product->get_status(),
     371                    "sku"               => $product->get_sku(),
     372                    "price"             => $this->get_formated_amount( (float) $item["subtotal"] ),
     373                    "regular_price"     => $this->get_formated_amount( (float) $product->get_regular_price() ),
     374                    "sale_price"        => $this->get_formated_amount( (float) $product->get_sale_price() ),
     375                    "tax_status"        => $product->get_tax_status(),
     376                    "stock"             => $product->get_stock_quantity(),
     377                    "stock_status"      => $product->get_stock_status(),
     378                    "weight"            => $product->get_weight(),
     379                    "discount"          => $this->get_formated_amount( (float) $item->get_total() ),
     380                    "subscription"      => $subscription_info,
     381                );
     382
     383                $subscription_info = [];
     384
     385                if ( array_key_exists( $item->get_id(), $license_info ) ) {
     386                    $productInfo['license'] = $license_info[ $item->get_id() ];
     387                }
    387388            }
    388389
  • thrivedesk/trunk/thrivedesk.php

    r3061863 r3087820  
    66 * Plugin URI:          https://www.thrivedesk.com/?utm_source=wp-plugins&utm_campaign=plugin-uri&utm_medium=wp-dash
    77 * Tags:                live chat, helpdesk, free live chat, knowledge base, thrivedesk
    8  * Version:             2.0.2
     8 * Version:             2.0.3
    99 * Author:              ThriveDesk
    1010 * Author URI:          https://profiles.wordpress.org/thrivedesk/
     
    5252     * @var string
    5353     */
    54     public $version = '2.0.2';
     54    public $version = '2.0.3';
    5555
    5656    /**
  • thrivedesk/trunk/vendor/composer/installed.php

    r3061863 r3087820  
    22    'root' => array(
    33        'name' => 'thrivedesk/wp-plugin',
    4         'pretty_version' => 'v2.0.2',
    5         'version' => '2.0.2.0',
    6         'reference' => 'cc83b2cb8dc6fb7a35d094e1f836c4ec0b17e176',
     4        'pretty_version' => 'v2.0.3',
     5        'version' => '2.0.3.0',
     6        'reference' => 'e5402191901617864770eb74fce649bc696765b3',
    77        'type' => 'library',
    88        'install_path' => __DIR__ . '/../../',
     
    1212    'versions' => array(
    1313        'thrivedesk/wp-plugin' => array(
    14             'pretty_version' => 'v2.0.2',
    15             'version' => '2.0.2.0',
    16             'reference' => 'cc83b2cb8dc6fb7a35d094e1f836c4ec0b17e176',
     14            'pretty_version' => 'v2.0.3',
     15            'version' => '2.0.3.0',
     16            'reference' => 'e5402191901617864770eb74fce649bc696765b3',
    1717            'type' => 'library',
    1818            'install_path' => __DIR__ . '/../../',
Note: See TracChangeset for help on using the changeset viewer.