
Security News
Next.js Patches Critical Middleware Vulnerability (CVE-2025-29927)
Next.js has patched a critical vulnerability (CVE-2025-29927) that allowed attackers to bypass middleware-based authorization checks in self-hosted apps.
Very simple Angular2+ wrapper for the WooCommerce API
Import ng2woo in any Angular application by running:
$ npm install --save ng2woo
Install the WooCommerce API:
npm install --save woocommerce-api
You will need to get the WooCommerce credentials from your WooCommerce website.
Then from your Angular AppModule
:
...
// Import ng2woo
import { WooApiModule, WooApiService } from 'ng2woo';
// Add your WooCommerce Credentials
const WooCommerceConfig = {
url: 'your_site_url',
consumerKey: 'ck_XXXXXXXXXXXXXXXXXXXXXXXXXXXX',
consumerSecret: 'cs_XXXXXXXXXXXXXXXXXXXXXXXXXXXXX',
wpAPI: true,
version: 'wc/v1'
};
@NgModule({
declarations: [ ... ],
imports: [
...
// Specify as an import and pass in your config
WooApiModule.forRoot(WooCommerceConfig)
],
// Add the Api service
providers: [ WooApiService ]
})
export class AppModule { }
Once ng2woo is imported, you can use the WooApiService
in your components/services:
import { Component, OnInit } from '@angular/core';
// Import the service
import { WooApiService } from 'ng2woo';
@Component({...})
export class HomePage implements OnInit {
products: any;
// Inject the service
constructor(private woo: WooApiService) { }
ngOnInit(): void {
// Fetch all products
this.woo.fetchItems('products')
.then(products => console.log(products));
}
}
fetchItems(itemType)
string
(required) - the type of WooCommerce item you want to fetch (products, orders, customers, categories). Accepts query parameters, see the WooCommerce Api docs for a full list of query parameters.Promise
Examples
this.woo.fetchItems('products')
.then(products => console.log(products))
.catch(error => console.log(error));
To generate all *.js
, *.js.map
and *.d.ts
files:
$ npm run tsc
To lint all *.ts
files:
$ npm run lint
MIT © Michael Doye
FAQs
Very simple Angular2+ wrapper for the WooCommerce API
We found that ng2woo demonstrated a not healthy version release cadence and project activity because the last version was released 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
Next.js has patched a critical vulnerability (CVE-2025-29927) that allowed attackers to bypass middleware-based authorization checks in self-hosted apps.
Security News
A survey of 500 cybersecurity pros reveals high pay isn't enough—lack of growth and flexibility is driving attrition and risking organizational security.
Product
Socket, the leader in open source security, is now available on Google Cloud Marketplace for simplified procurement and enhanced protection against supply chain attacks.