kloon / WooCommerce-REST-API-Client-Library

A PHP wrapper for the WooCommerce REST API
GNU General Public License v3.0
356 stars 175 forks source link

v3 version of woocommerce API #158

Open Dewilas opened 8 years ago

Dewilas commented 8 years ago

Hello,

maybe can you create update to version v3? I need to create product attribute and his terms. Thank you

abada commented 8 years ago

Yes Please !

danpoynor commented 8 years ago

The new product attribute endpoints would be very useful.

gobido commented 8 years ago

hello I found how to upgrade to v3, class-wc-api-client.php line 164 :v2->v3 class-wc-api-client-authentication.php line 104: $this->consumer_secret . '&'

kg4nds commented 8 years ago

@gobido

are you sure about the line number on this:

class-wc-api-client-authentication.php line 104: $this->consumer_secret . '&'

My version if that file has comments on and around that line. Maybe you could post what the original line said for search?

Thanks

gobido commented 8 years ago

public function generate_oauth_signature( $params, $http_method ) {

return base64_encode( hash_hmac( self::HASH_ALGORITHM, $string_to_sign, $this->consumer_secret . '&', true ) );

after you update these you need to write other code for new functions

enricodeleo commented 8 years ago

@gobido I just started a fork for v3, but I didn't found the need of adding '&' after the consumer_secret. Are you getting authentication errors ?

gobido commented 8 years ago

yes I got an authentication error so I added &

I coded with product bulk because I need to update lots of stock

give you my code, for ref separate with product with a new class, so that won't mix with original path (products and product) I also modified get by sku and

Best Regard,

黃俊裕 Vincent Huang

mobile: 台灣Taiwan: (886) 919 005 158 中國China : (86)139-1037 7101

享樂光學有限公司 Bokkeh Co., Ltd. 統編 (VAT Number): 24474421

TEL: (886)-2-2321-2475 #88 FAX: (886)-2-2321-4373

10058台北市中正區八德路一段43巷28號3樓 3F, No. 28, Ln. 43, Sec. 1, Bade Rd., Zhongzheng Dist., Taipei 10058, Taiwan

http://www.foto-flex.com

http://www.gobido.com

2016-03-30 8:45 GMT+08:00 Enrico Deleo notifications@github.com:

@gobido https://github.com/gobido I just started a fork for v3, but I didn't found the need of adding & after the consumer_secret. Are you getting authentication errors ?

— You are receiving this because you were mentioned. Reply to this email directly or view it on GitHub https://github.com/kloon/WooCommerce-REST-API-Client-Library/issues/158#issuecomment-203172432

ramana4029 commented 8 years ago

Thanks @gobido, you saved my day. I just added & to the consumer_secret and it started working.

Seems to be a bug in Woocommerce