WooCommerce-REST-API-Client-Library icon indicating copy to clipboard operation
WooCommerce-REST-API-Client-Library copied to clipboard

v3 version of woocommerce API

Open Dewilas opened this issue 9 years ago • 8 comments

Hello,

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

Dewilas avatar Feb 11 '16 08:02 Dewilas

Yes Please !

abada avatar Feb 18 '16 20:02 abada

The new product attribute endpoints would be very useful.

danpoynor avatar Feb 19 '16 18:02 danpoynor

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 . '&'

gobido avatar Feb 25 '16 16:02 gobido

@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

kg4nds avatar Feb 29 '16 14:02 kg4nds

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

gobido avatar Mar 22 '16 10:03 gobido

@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 ?

enricodeleo avatar Mar 30 '16 00:03 enricodeleo

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 [email protected]:

@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

gobido avatar Mar 31 '16 01:03 gobido

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

Seems to be a bug in Woocommerce

ramana4029 avatar Apr 01 '16 20:04 ramana4029