Changeset 3087820
- Timestamp:
- 05/16/2024 01:34:17 PM (23 months ago)
- Location:
- thrivedesk
- Files:
-
- 12 edited
- 1 copied
-
tags/2.0.3 (copied) (copied from thrivedesk/trunk)
-
tags/2.0.3/includes/views/partials/integrations.php (modified) (1 diff)
-
tags/2.0.3/readme.txt (modified) (2 diffs)
-
tags/2.0.3/src/Api.php (modified) (3 diffs)
-
tags/2.0.3/src/Plugins/WooCommerce.php (modified) (2 diffs)
-
tags/2.0.3/thrivedesk.php (modified) (2 diffs)
-
tags/2.0.3/vendor/composer/installed.php (modified) (2 diffs)
-
trunk/includes/views/partials/integrations.php (modified) (1 diff)
-
trunk/readme.txt (modified) (2 diffs)
-
trunk/src/Api.php (modified) (3 diffs)
-
trunk/src/Plugins/WooCommerce.php (modified) (2 diffs)
-
trunk/thrivedesk.php (modified) (2 diffs)
-
trunk/vendor/composer/installed.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
thrivedesk/tags/2.0.3/includes/views/partials/integrations.php
r3049145 r3087820 42 42 ], 43 43 [ 44 'namespace' => ' wp-marketing-automations',44 'namespace' => 'autonami', 45 45 'name' => __( 'FunnelKit', 'thrivedesk' ), 46 46 'image' => 'autonami.png', -
thrivedesk/tags/2.0.3/readme.txt
r3061863 r3087820 4 4 Requires at least: 4.9 5 5 Tested up to: 6.4 6 Stable Tag: 2.0. 26 Stable Tag: 2.0.3 7 7 Requires PHP: 5.5 8 8 License: GNU General Public License v2.0 or later … … 233 233 234 234 == Changelog == 235 = 2.0.3 = 236 - Fix: WooCommerce product data missing issue 237 - Fix : FunnelKit namespace issue 238 235 239 = 2.0.2 = 236 240 - Update: Enhanced WooCommerce integration -
thrivedesk/tags/2.0.3/src/Api.php
r3010934 r3087820 228 228 foreach ( $products as $product_id ) { 229 229 $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 } 230 236 231 237 $productInfo = array( … … 233 239 "title" => $product->get_name(), 234 240 "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] : '', 236 242 "sale_price" => get_woocommerce_currency_symbol() . $product->get_regular_price(), 237 243 "stock" => ( 'instock' === $product->get_stock_status() ) ? 'In Stock' : 'Out of Stock', … … 271 277 $item->set_subtotal( $product->price ?? 0 ); 272 278 $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 273 285 $order = wc_get_order( $order_id ); 274 286 $order->add_item( $item ); -
thrivedesk/tags/2.0.3/src/Plugins/WooCommerce.php
r3061863 r3087820 343 343 344 344 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(); 347 347 $product = wc_get_product($product_id); 348 348 … … 358 358 ]; 359 359 } 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 } 387 388 } 388 389 -
thrivedesk/tags/2.0.3/thrivedesk.php
r3061863 r3087820 6 6 * Plugin URI: https://www.thrivedesk.com/?utm_source=wp-plugins&utm_campaign=plugin-uri&utm_medium=wp-dash 7 7 * Tags: live chat, helpdesk, free live chat, knowledge base, thrivedesk 8 * Version: 2.0. 28 * Version: 2.0.3 9 9 * Author: ThriveDesk 10 10 * Author URI: https://profiles.wordpress.org/thrivedesk/ … … 52 52 * @var string 53 53 */ 54 public $version = '2.0. 2';54 public $version = '2.0.3'; 55 55 56 56 /** -
thrivedesk/tags/2.0.3/vendor/composer/installed.php
r3061863 r3087820 2 2 'root' => array( 3 3 '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', 7 7 'type' => 'library', 8 8 'install_path' => __DIR__ . '/../../', … … 12 12 'versions' => array( 13 13 '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', 17 17 'type' => 'library', 18 18 'install_path' => __DIR__ . '/../../', -
thrivedesk/trunk/includes/views/partials/integrations.php
r3049145 r3087820 42 42 ], 43 43 [ 44 'namespace' => ' wp-marketing-automations',44 'namespace' => 'autonami', 45 45 'name' => __( 'FunnelKit', 'thrivedesk' ), 46 46 'image' => 'autonami.png', -
thrivedesk/trunk/readme.txt
r3061863 r3087820 4 4 Requires at least: 4.9 5 5 Tested up to: 6.4 6 Stable Tag: 2.0. 26 Stable Tag: 2.0.3 7 7 Requires PHP: 5.5 8 8 License: GNU General Public License v2.0 or later … … 233 233 234 234 == Changelog == 235 = 2.0.3 = 236 - Fix: WooCommerce product data missing issue 237 - Fix : FunnelKit namespace issue 238 235 239 = 2.0.2 = 236 240 - Update: Enhanced WooCommerce integration -
thrivedesk/trunk/src/Api.php
r3010934 r3087820 228 228 foreach ( $products as $product_id ) { 229 229 $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 } 230 236 231 237 $productInfo = array( … … 233 239 "title" => $product->get_name(), 234 240 "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] : '', 236 242 "sale_price" => get_woocommerce_currency_symbol() . $product->get_regular_price(), 237 243 "stock" => ( 'instock' === $product->get_stock_status() ) ? 'In Stock' : 'Out of Stock', … … 271 277 $item->set_subtotal( $product->price ?? 0 ); 272 278 $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 273 285 $order = wc_get_order( $order_id ); 274 286 $order->add_item( $item ); -
thrivedesk/trunk/src/Plugins/WooCommerce.php
r3061863 r3087820 343 343 344 344 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(); 347 347 $product = wc_get_product($product_id); 348 348 … … 358 358 ]; 359 359 } 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 } 387 388 } 388 389 -
thrivedesk/trunk/thrivedesk.php
r3061863 r3087820 6 6 * Plugin URI: https://www.thrivedesk.com/?utm_source=wp-plugins&utm_campaign=plugin-uri&utm_medium=wp-dash 7 7 * Tags: live chat, helpdesk, free live chat, knowledge base, thrivedesk 8 * Version: 2.0. 28 * Version: 2.0.3 9 9 * Author: ThriveDesk 10 10 * Author URI: https://profiles.wordpress.org/thrivedesk/ … … 52 52 * @var string 53 53 */ 54 public $version = '2.0. 2';54 public $version = '2.0.3'; 55 55 56 56 /** -
thrivedesk/trunk/vendor/composer/installed.php
r3061863 r3087820 2 2 'root' => array( 3 3 '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', 7 7 'type' => 'library', 8 8 'install_path' => __DIR__ . '/../../', … … 12 12 'versions' => array( 13 13 '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', 17 17 'type' => 'library', 18 18 'install_path' => __DIR__ . '/../../',
Note: See TracChangeset
for help on using the changeset viewer.