wc-api-ruby icon indicating copy to clipboard operation
wc-api-ruby copied to clipboard

REST API Documentation refers to "wp_json" option instead of "wp_api", yielding confusing results.

Open innerfence opened this issue 3 years ago • 0 comments

In the REST API Documentation under Authentication over HTTPS, the sample code given for ruby is:

require "woocommerce_api"

woocommerce = WooCommerce::API.new(
  "https://example.com",
  "consumer_key",
  "consumer_secret",
  {
    wp_json: true,
    version: "wc/v3"
  }
)

When using this sample code, my attempts to access the index with woocommerce.get("") returned -1.

The problem seems to be that this code shows a non-existent wp_json option. The correct name of this option is wp_api.

innerfence avatar Apr 14 '22 21:04 innerfence