
Security News
/Research
Wallet-Draining npm Package Impersonates Nodemailer to Hijack Crypto Transactions
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
apimatic-woo-commerce-sdk
Advanced tools
WooCommerce API is a REST API for WordPress that enables developers to manage products, orders, customers, and store settings, making it easy to build and extend custom eCommerce solutions.
Taken from: https://github.com/woocommerce/woocommerce-rest-api-docs
WooCommerce (WC) 2.6+ is fully integrated with the WordPress REST API. This allows WC data to be created, read, updated, and deleted using requests in JSON format and using WordPress REST API Authentication methods and standard HTTP verbs which are understood by most HTTP clients.
The current WP REST API integration version is v3
which takes a first-order position in endpoints.
The following table shows API versions present in each major version of WooCommerce:
API Version | WC Version | WP Version | Documentation |
---|---|---|---|
`v3` | 3.5.x or later | 4.4 or later | - |
`v2` | 3.0.x or later | 4.4 or later | [v2 docs](https://woocommerce.github.io/woocommerce-rest-api-docs/wp-api-v2.html) |
`v1` | 2.6.x or later | 4.4 or later | [v1 docs](https://woocommerce.github.io/woocommerce-rest-api-docs/wp-api-v1.html) |
Prior to 2.6, WooCommerce has had a REST API separate from WordPress which is now known as the legacy API. You can find the documentation for the legacy API separately.
API Version | WC Version | WP Version | Documentation |
---|---|---|---|
`Legacy v3` | 2.4.x or later | 4.1 or later | [Legacy v3 docs](https://woocommerce.github.io/woocommerce-rest-api-docs/v3.html) |
`Legacy v2` | 2.2.x or later | 4.1 or later | [Legacy v2 docs](https://woocommerce.github.io/woocommerce-rest-api-docs/v2.html) |
`Legacy v1` | 2.1.x or later | 4.1 or later | [Legacy v1 docs](https://woocommerce.github.io/woocommerce-rest-api-docs/v1.html) |
To use the latest version of the REST API you must be using:
Settings > Permalinks
so that the custom endpoints are supported. Default permalinks will not work.If you use ModSecurity and see 501 Method Not Implemented
errors, see this issue for details.
Run the following command from your project directory to install the package from npm:
npm install apimatic-woo-commerce-sdk@1.0.0
For additional package details, see the Npm page for the apimatic-woo-commerce-sdk@1.0.0 npm.
To validate the functionality of this SDK, you can execute all tests located in the test
directory. This SDK utilizes Jest
as both the testing framework and test runner.
To run the tests, navigate to the root directory of the SDK and execute the following command:
npm run test
Or you can also run tests with coverage report:
npm run test:coverage
Note: Documentation for the client can be found here.
The following parameters are configurable for the API Client:
Parameter | Type | Description |
---|---|---|
environment | Environment | The API environment. Default: Environment.Production |
timeout | number | Timeout for API calls. Default: 0 |
httpClientOptions | Partial<HttpClientOptions> | Stable configurable http client options. |
unstableHttpClientOptions | any | Unstable configurable http client options. |
basicAuthCredentials | BasicAuthCredentials | The credential object for basicAuth |
The API client can be initialized as follows:
import { Client, Environment } from 'apimatic-woo-commerce-sdk';
const client = new Client({
basicAuthCredentials: {
username: 'username',
password: 'password'
},
timeout: 0,
environment: Environment.Production,
});
This API uses the following authentication schemes.
FAQs
WooCommerce API is a REST API for WordPress that enables developers to manage products, orders, customers, and store settings, making it easy to build and extend custom eCommerce solutions.
The npm package apimatic-woo-commerce-sdk receives a total of 65 weekly downloads. As such, apimatic-woo-commerce-sdk popularity was classified as not popular.
We found that apimatic-woo-commerce-sdk demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
/Research
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
Security News
This episode explores the hard problem of reachability analysis, from static analysis limits to handling dynamic languages and massive dependency trees.
Security News
/Research
Malicious Nx npm versions stole secrets and wallet info using AI CLI tools; Socket’s AI scanner detected the supply chain attack and flagged the malware.