Skip to content

Instantly share code, notes, and snippets.

@chrisjangl
Created June 14, 2023 23:22
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 chrisjangl/40525b031fae21536976470e370c7c3c to your computer and use it in GitHub Desktop.
Save chrisjangl/40525b031fae21536976470e370c7c3c to your computer and use it in GitHub Desktop.
[WP Pizza] Enable all ingredients in a specific meal size when on the WP Pizza Ingredients page, Ingredients tab
// get a node list of all the ingredients on the page
var ingredients = document.querySelectorAll('.wppizza_ingr_option.wppizza_option');
// and then loop through each one, setting the meal size
ingredients.forEach(function(ingredient){
ingredient.querySelector('input[type="checkbox"]').checked=true;
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment