MattiaRigotti
Forum Replies Created
-
This was extremely helpful, thanks.
The only thing I needed was to add a “&” after my consumer_secret while encoding, and now it works like a charm.Thank you again!
Thank you for your answer!
I followed the guide but I do not see any difference from my script, I cannot isolate what has changed from the previous version.
Here is what is generated from my script:
GET&http%3A%2F%2Fmy.site.com%2Ffolder%2Fwc-api%2Fv3&oauth_consumer_key%3Dck_various_numbers_and_letters%26oauth_nonce%3D21b11ea0026066a6102bbd8905c7848809e6595e%26oauth_signature_method%3DHMAC-SHA256%26oauth_timestamp%3D1442417198
Signature:
NY5NYVAj5j5tfLry5l8Znmv/c1SYXp0gpgT0XbKqRcE=Does this seem right? Maybe there is some glaring problem that I don’t see. (I have changed the sensible data but the structure is the same)
Forum: Plugins
In reply to: [WooCommerce] REST API Categories problemThank you for the reply!
In the end I resolved by modifying wordpress to work like it’s advertised on the documentation.
If anyone is interested in how to do it, here are some easy steps:
– Locate your woocommerce installation folder. Should be in “www.your.site/wp-content/plugins” and search for a folder named “woocommerce”.
– Find class-wc-api-products.php in “woocommerce_folder/includes/api.
– Open it and go around line 1053. You’ll find something like this:// Product categories if ( isset( $data['categories'] ) && is_array( $data['categories'] ) ) { $terms = array_map( 'wc_clean', $data['categories'] ); wp_set_object_terms( $product_id, $terms, 'product_cat' ); }– You just need to replace “wc_clean” with “intval” and the job is done!
NOTE: I’m using WooCommerce 2.3.11.