Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

66 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

WooCommerce API Java Wrapper

CI Maven Central License: MIT

A small Java wrapper for the WooCommerce REST API, originally released in 2016 and distributed through Maven Central.

I originally created this library while building automation for a client's WordPress/WooCommerce store from a Java application. The project later found users of its own, even though it received very little maintenance for almost a decade.

Maintenance release: version 1.5.0 restores supported dependencies, CI, release infrastructure, and a tested community fix while preserving the 1.x public API. This is a maintained legacy client, not an official WooCommerce SDK.

WooCommerce currently lists this repository among the third-party Java libraries in its REST API documentation. WooCommerce does not provide support for third-party libraries.

Installation

<dependency>
  <groupId>com.icoderman</groupId>
  <artifactId>wc-api-java</artifactId>
  <version>1.5.0</version>
</dependency>

Usage

OAuthConfig config = new OAuthConfig(
    "http://localhost",
    System.getenv("WC_CONSUMER_KEY"),
    System.getenv("WC_CONSUMER_SECRET")
);
WooCommerce wooCommerce = new WooCommerceAPI(config, ApiVersionType.V3);

Map<String, String> params = new HashMap<>();
params.put("per_page", "100");
List products = wooCommerce.getAll(EndpointBaseType.PRODUCTS.getValue(), params);

Never commit WooCommerce credentials. Supply them through a secret manager or environment variables.

Compatibility

  • Java 8 or newer
  • WooCommerce REST API v2/v3 endpoints
  • Legacy OAuth 1.0a request signing over HTTP

The 1.x client does not implement WooCommerce HTTPS Basic Authentication. Use it only in a controlled environment until HTTPS-first authentication is available in a future major release.

Maintenance status

The 1.x line receives bounded maintenance for dependency/security updates, reproducible bug fixes, CI compatibility, and documentation corrections. New endpoints, broad API modeling, and breaking changes are outside the 1.x scope.

See MAINTENANCE.md for the support policy and release gates.

Development

mvn verify -Dgpg.skip=true

Maintainers preparing a Central release should follow RELEASING.md.

See CONTRIBUTING.md and SECURITY.md before opening an issue or pull request.

License

MIT © Oleksandr Mandryk

About

Maintained legacy Java wrapper for the WooCommerce REST API

Topics

Resources

Contributing

Security policy

Stars

103 stars

Watchers

12 watching

Forks

Releases

Packages

Used by

Contributors

Languages