Skip to content

Instantly share code, notes, and snippets.

@YourMark
Created December 14, 2018 11:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save YourMark/fcf49aaca3a04f97c40a19bee49ec15c to your computer and use it in GitHub Desktop.
Save YourMark/fcf49aaca3a04f97c40a19bee49ec15c to your computer and use it in GitHub Desktop.
Get all WooCommerce orders ids in a comma separated list from the order overview in admin
const orders = document.querySelectorAll('#the-list tr');
let orderIds = [];
orders.forEach( (order) => {
orderIds.push(order.id.split('-')[1]);
});
console.log(orderIds.join(','));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment