Changeset 2842484
- Timestamp:
- 01/02/2023 07:27:56 PM (3 years ago)
- Location:
- viaads
- Files:
-
- 15 added
- 3 edited
-
tags/1.0.5 (added)
-
tags/1.0.5/apikey.php (added)
-
tags/1.0.5/externalJS.php (added)
-
tags/1.0.5/handleEmailGuid.php (added)
-
tags/1.0.5/hooks (added)
-
tags/1.0.5/hooks/addCart.php (added)
-
tags/1.0.5/hooks/pageLook.php (added)
-
tags/1.0.5/hooks/removeCart.php (added)
-
tags/1.0.5/http.php (added)
-
tags/1.0.5/js (added)
-
tags/1.0.5/js/viaads_handleEmailGuid.js (added)
-
tags/1.0.5/readme.txt (added)
-
tags/1.0.5/sync.php (added)
-
tags/1.0.5/userAgent.php (added)
-
tags/1.0.5/viaads.php (added)
-
trunk/readme.txt (modified) (1 diff)
-
trunk/sync.php (modified) (5 diffs)
-
trunk/viaads.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
viaads/trunk/readme.txt
r2841526 r2842484 4 4 Requires at least: 5.4 5 5 Tested up to: 6.1 6 Stable tag: 1.0. 46 Stable tag: 1.0.5 7 7 Requires PHP: 7.0 8 8 License: GPLv3 -
viaads/trunk/sync.php
r2838166 r2842484 280 280 . date( 'Y-m-d', strtotime( date( "Y-m-d" ) . ' + 14 days' ) ), 281 281 ) );*/ 282 282 283 $orders = []; 283 284 foreach ( $orderCollection as $order ) { 284 285 $order_object = new stdClass(); 285 286 // Order Number 286 $order_object->Order_number = "{$order-> ID}";287 $order_object->Order_number = "{$order->get_id()}"; 287 288 // Order Status 288 289 $order_object->Status = $order->get_status(); 289 290 // Total Price 290 $order_object->Total_price = $order-> data[ 'total' ] - $order->data[ 'total_tax' ] - $order->data[ 'shipping_total' ];291 $order_object->Total_price = $order->get_total() - $order->get_total_tax() - $order->get_shipping_total(); 291 292 // Tax 292 $order_object->Total_price_tax = $order-> data[ 'cart_tax' ];293 $order_object->Total_price_tax = $order->get_cart_tax(); 293 294 // Total Price Tax Included 294 $order_object->Total_price_tax_included = $order-> data[ 'total' ] - $order->data[ 'shipping_total' ];295 $order_object->Total_price_tax_included = $order->get_total() - $order->get_shipping_total(); 295 296 // Customer Note 296 $order_object->Customer_note = $order-> data[ 'customer_note' ];297 $order_object->Customer_note = $order->get_customer_note(); 297 298 // Currency 298 $order_object->Currency = $order-> data[ 'currency' ];299 $order_object->Currency = $order->get_currency(); 299 300 // Last Modified 300 301 $lastModifiedGmt = new DateTime( $order->get_date_modified() ); … … 303 304 // Billing Address 304 305 $order_billing_address = new stdClass(); 305 $order_billing_address->first_name = $order-> data[ 'billing' ][ 'first_name' ];306 $order_billing_address->last_name = $order-> data[ 'billing' ][ 'last_name' ];307 $order_billing_address->address1 = $order-> data[ 'billing' ][ 'address_1' ];308 $order_billing_address->city = $order-> data[ 'billing' ][ 'city' ];309 $order_billing_address->state = $order-> data[ 'billing' ][ 'state' ];310 $order_billing_address->zip_code = $order-> data[ 'billing' ][ 'postcode' ];311 $order_billing_address->country = $order-> data[ 'billing' ][ 'country' ];312 $order_billing_address->phone_number = $order-> data[ 'billing' ][ 'phone' ];313 $order_billing_address->email = $order-> data[ 'billing' ][ 'email' ];306 $order_billing_address->first_name = $order->get_billing_first_name(); 307 $order_billing_address->last_name = $order->get_billing_last_name(); 308 $order_billing_address->address1 = $order->get_billing_address_1(); 309 $order_billing_address->city = $order->get_billing_city(); 310 $order_billing_address->state = $order->get_billing_state(); 311 $order_billing_address->zip_code = $order->get_billing_postcode(); 312 $order_billing_address->country = $order->get_billing_country(); 313 $order_billing_address->phone_number = $order->get_billing_phone(); 314 $order_billing_address->email = $order->get_billing_email(); 314 315 $order_object->Billing_address = $order_billing_address; 316 315 317 316 318 // Shipping Address 317 319 $order_shipping_address = new stdClass(); 318 $order_shipping_address->first_name = $order-> data[ 'shipping' ][ 'first_name' ];319 $order_shipping_address->last_name = $order-> data[ 'shipping' ][ 'last_name' ];320 $order_shipping_address->address1 = $order-> data[ 'shipping' ][ 'address_1' ];321 $order_shipping_address->city = $order-> data[ 'shipping' ][ 'city' ];322 $order_shipping_address->state = $order-> data[ 'shipping' ][ 'state' ];323 $order_shipping_address->zip_code = $order-> data[ 'shipping' ][ 'postcode' ];324 $order_shipping_address->country = $order-> data[ 'shipping' ][ 'country' ];325 $order_shipping_address->phone_number = $order-> data[ 'shipping' ][ 'phone' ];326 $order_shipping_address->email = $order-> data[ 'shipping' ][ 'email' ];320 $order_shipping_address->first_name = $order->get_shipping_first_name(); 321 $order_shipping_address->last_name = $order->get_shipping_last_name(); 322 $order_shipping_address->address1 = $order->get_shipping_address_1(); 323 $order_shipping_address->city = $order->get_shipping_city(); 324 $order_shipping_address->state = $order->get_shipping_state(); 325 $order_shipping_address->zip_code = $order->get_shipping_postcode(); 326 $order_shipping_address->country = $order->get_shipping_country(); 327 $order_shipping_address->phone_number = $order->get_shipping_phone(); 328 $order_shipping_address->email = $order->get_billing_email(); 327 329 $order_object->Shipping_address = $order_shipping_address; 328 330 … … 331 333 $order_item_object = new stdClass(); 332 334 // Product Id 333 $order_item_object->Product_id = $item->get_variation_id(); 334 $order_item_object->WebshopProductId = $item->get_variation_id(); 335 $order_item_object->Product_id = "{$item->get_product_id()}"; 336 $order_item_object->Product_variant_id = "{$item->get_variation_id()}"; 337 $order_item_object->WebshopProductId = "{$item->get_product_id()}"; 335 338 // Name 336 339 $order_item_object->Name = $item->get_name(); … … 359 362 $payment_object = new stdClass(); 360 363 // Payment Method 361 $payment_object->Method_title = $order-> data[ 'payment_method_title' ];364 $payment_object->Method_title = $order->get_payment_method_title(); 362 365 // Payment Code 363 $payment_object->Method = $order-> data[ 'payment_method' ];366 $payment_object->Method = $order->get_payment_method(); 364 367 $orderFinal->Payment = $payment_object; 365 368 … … 369 372 // Customer 370 373 $customer = new stdClass(); 371 $customer->Email = $order-> data[ 'billing' ][ 'email' ];374 $customer->Email = $order->get_billing_email(); 372 375 $orderFinal->customer = $customer; 373 376 -
viaads/trunk/viaads.php
r2841526 r2842484 3 3 * Plugin Name: ViaAds 4 4 * Description: Plugin der muliggør forbindelsen til ViaAds / Plug-in enabling the connection to ViaAds. 5 * Version: 1.0. 45 * Version: 1.0.5 6 6 * Author: ViaAds 7 7 * Author URI: https://www.viaads.dk/
Note: See TracChangeset
for help on using the changeset viewer.