Comments (17)
Notes will now appear in the order listing.
from woocommerce-json-api.
The order status now shows correctly.
from woocommerce-json-api.
Updating products has been restored.
from woocommerce-json-api.
Write access for orders is coming soon! I'll have to look further into coupons and see how to best represent them.
from woocommerce-json-api.
Test Suite in PHP and one in JS is also being updated/built.
You can check tests with php tests/suite.php
New JS testing interface is in tests/interface/index.html is a full testing app.
from woocommerce-json-api.
@jasonknight How can I use both testing suites, as per installation and setting it uo,
Thanks
from woocommerce-json-api.
load index.html into a browser, just open the file directly, or the file path to the site. If you don't, you'll have cross domain issues.
Using the php testing suite from the command line is easiest.
from woocommerce-json-api.
@jasonknight using the js testing client only the get_system_time, get_supported_attributes, get_products, set_products are working.
Also how can I use the php testing suite from the command line (I uses Windows)
from woocommerce-json-api.
Early order write support now added. Only adding notes has been tested.
from woocommerce-json-api.
@tubiz I use windows.
Then you probably can't...I suggest you download Virtual Box and install Debian for testing. WooComm is meant to be deployed to a Linux based server.
Ideally it might kind of work on windows, you'd just have to install php, and do the normal CMD thing, though the test suite uses consol colors, so some junk would appear. You could also test it on your staging server.
from woocommerce-json-api.
Go here and get XAMPP: http://www.apachefriends.org/en/xampp.html
Then install wordpress: http://www.wikihow.com/Install-Wordpress-on-XAMPP
Download and install the woocommerce plugin...
Then run cmd and cd to the plugins directory...and you C:\path\to\xampp\php.exe tests\suite.php
Or something similar. That's just off the top of my head though...Don't really use windows for that kind of stuff.
from woocommerce-json-api.
@jasonknight the right order status is still not displayed.
All order status still returns pending.
from woocommerce-json-api.
Here are the results of the test on my system after making three orders:
salor@salor-retail:/var/www/woo/wp-content/plugins/woocommerce-json-api$ php tests/get_orders.php
*----------------------------------------------------*
Reading Orders
*----------------------------------------------------*
Has Notes? 1 should equal 1 PASSED
Has OrderItems 1 should equal 1 PASSED
Order status `processing` should not == pending PASSED
Order status `refunded` should not == pending PASSED
Order status `on-hold` should not == pending PASSED
salor@salor-retail:/var/www/woo/wp-content/plugins/woocommerce-json-api$
Make sure you have the latest copy?
from woocommerce-json-api.
@jasonknight All my orders are still returning an order status of pending.
Here is the result of my test, don't know what might be causing it, I am using the lastest copy of the plugin.
Thanks a lot for your help so far.
Windows PowerShell
Copyright (C) 2009 Microsoft Corporation. All rights reserved.
PS C:\Users\TUBIZ> cd c:/
PS C:\> cd .\wamp\www
PS C:\wamp\www> cd .\cartmultisite\wp-content\plugins
PS C:\wamp\www\cartmultisite\wp-content\plugins> cd .\woocommerce-json-api
PS C:\wamp\www\cartmultisite\wp-content\plugins\woocommerce-json-api> cd .\tests
PS C:\wamp\www\cartmultisite\wp-content\plugins\woocommerce-json-api\tests> php .\get_orders.php
←[0;34m *----------------------------------------------------* ←[0m
←[0;34m Reading Orders ←[0m
←[0;34m *----------------------------------------------------* ←[0m
←[1;33m←[40mHas Notes? 1 should equal 1 ←[0m←[0;32m←[40mPASSED←[0m
←[1;33mHas OrderItems 1 should equal 1 ←[0m←[0;32mPASSED←[0m
←[1;33m←[40mOrder status `pending` should not == pending ←[0m←[0;31m←[40mFAILED←[0m
PS C:\wamp\www\cartmultisite\wp-content\plugins\woocommerce-json-api\tests>
from woocommerce-json-api.
What is the database value of the order status? Does it perhaps not have one?
Pending usually means no order status was actually found in the database. What does the status say for this order on the orders show page in woocom?
The code is with a sql query inside WCAPI\Order.php::getStatus() Look in that function and run the sql manually, try to figure out why it's not returning a result. Debug what is returned etc.
from woocommerce-json-api.
@jasonknight the order status in WC in WP admin is processing, but using the API in my laravel app it is pending.
I tried running the query but no result was found.
SELECT
t.slug
FROM
wp_terms as t,
wp_term_relationships as tr,
wp_term_taxonomy as tt
WHERE
tt.taxonomy = 'shop_order_status' AND
t.term_id = tt.term_id AND
tr.term_taxonomy_id = tt.term_taxonomy_id AND
tr.object_id = {$this->_actual_model_id}
ORDER BY tr.term_order
The value of {$this->_actual_model_id} that I passed is the order id of the order.
Note that I am using this in a multisite install.
from woocommerce-json-api.
Woopsie, table names were hard coded...fixed I hope, pull and see.
from woocommerce-json-api.
Related Issues (20)
- Issue With get_products HOT 1
- Issues With set_product HOT 1
- Support for delete product HOT 1
- Deleting Product Variation HOT 1
- How can I set featured image when set_products? HOT 1
- URL HOT 1
- How can i use this plugin?
- How can i use this plugin? HOT 2
- Product attribute 'attributes' is represented as array, map or string HOT 5
- invalid api user HOT 1
- Feature request: get_* include last modified time HOT 4
- Var not set HOT 2
- Plans To Support Filters HOT 6
- Issues With get_orders() and get_products
- Question regarding target url HOT 3
- Is it possible to test the plugin using cUrl method? HOT 4
- Plugin can not be activated after installation HOT 2
- TypeError HOT 2
- Create a Product and add it to a WooThemes Subscription HOT 1
- package management HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from woocommerce-json-api.