Created
December 14, 2018 11:56
-
-
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
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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