• Resolved smkh1

    (@smkh1)


    Hello,

    Recently my woocommerce rest api stopped working, i did alot of search tried many solutions such as enabling Authorization Headers from Htaccess nothing worked,
    Then i tried deactivating all plugins one by one, so when i deactivated TeraWallet my woocommerce rest api was back to normal, and then when i re-enabled the TeraWallet my rest-api again through same error so it is confirmed that TeraWallet is not supporting current version of Woocommerce Rest API!.

    It was working perfectly last few months i dont know what happened i did not change anything on my website no changes in any plugins,
    I think it happened because of the updates in Woocommerce plugin yes i do updated the plugins and i think TeraWallet is not compatible with the latest version of woocommerce and it is causing errors in Rest API

    WHEN TERA WALLET IS ENABLED I GET THIS ERROR WITH GET REQUEST>:-
    {“code”:”woocommerce_rest_cannot_view”,”message”:”Sorry, you cannot list resources.”,”data”:{“status”:401}}
    same error with POST request but with different message “Sorry, you cannot create resources” .

    UPDATE:-
    It is working perfectly with WOOCOMMERCE Version 3.7.1.
    i have temporarily downgraded my woocommerce to make it work!. its working just perfect like before ! ?? .
    I also tried other versions like 3.8.1 and it did not work on them too not compatible with them, Working with 3.7.1 or less than 3.7.1

    • This topic was modified 5 years, 1 month ago by smkh1.
Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Subrata Mal

    (@subratamal)

    @smkh1 Thanks for reporting this issue. We are working on it and if we found any conflict with latest version of WooCommerce we will fix that in our next update.

    Thanks

    Plugin Author Subrata Mal

    (@subratamal)

    Hi @smkh1

    We have checked this with WooCommerce version 3.8.1 and also with the latest version 3.9.1 and working fine with both versions.

    Here is the example PHP code using the WooCommerce REST API.

    // Setup:
    require __DIR__ . '/vendor/autoload.php';
    
    use Automattic\WooCommerce\Client;
    
    $woocommerce = new Client(
        'https://site-url', // Your store URL
        'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX', // Your consumer key
        'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX', // Your consumer secret
        [
            'wp_api' => true, // Enable the WP REST API integration
            'version' => 'wc/v2' // WooCommerce WP REST API version
        ]
    );
    
    print_r($woocommerce->get('wallet/balance/1'));
    Plugin Author Subrata Mal

    (@subratamal)

    Hi @smkh1

    We have not received any update on this topic. So we are closing this topic please feel free to create another one for any other assistance.

    Thanks

    Hello @subratamal

    I have used these code

    require __DIR__ . ‘/vendor/autoload.php’;

    use Automattic\WooCommerce\Client;

    $woocommerce = new Client(
    https://site-url’, // Your store URL
    ‘XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX’, // Your consumer key
    ‘XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX’, // Your consumer secret
    [
    ‘wp_api’ => true, // Enable the WP REST API integration
    ‘version’ => ‘wc/v3’ // WooCommerce WP REST API version
    ]
    );

    and hit api on post then not working but i have used ‘version’=>’v3’ then working

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘incompatible with new version of WooCommerce’ is closed to new replies.