How do I change the initial quantity of a product in woocommerce?

You can use the woocommerce_quantity_input_args filter: function wpse_292293_quantity_input_default( $args, $product ) { $args[‘input_value’] = 2; return $args; } add_filter( ‘woocommerce_quantity_input_args’, ‘wpse_292293_quantity_input_default’, 10, 2 ); When the quantity input is output, it’s output with the woocommerce_quantity_input() function. This function accepts several arguments including the default value for the input. This filter lets you replace values in … Read more

Is there an “Add Page” hook?

If you want to target the admin page that displays the post editor, you’ll likely need to hook to two places whether it’s for a script or style. You’d use the top two for scripts and the bottom two for styles. // Script action for the post new page add_action( ‘admin_print_scripts-post-new.php’, ‘example_callback’ ); // Script … Read more

How to find hooks as per Just-In-Time approach?

Take a look at Mike’s answer to a similar question more specifically the plugin he posted there can be used to create a list of all action hooks and filters that were called to generate that page in order of execution. Hope this helps