Created
June 14, 2023 23:22
-
-
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
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
// 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