WooCommerce – new order email hook

A list of all the WooCommerce hooks can be found here. The way I understand it, e-mail sending is handled by way of the WC_Email class by way of the ->send() method. According to the code, it looks like the woocommerce_mail_callback_params hook might be for what you are looking.

Checkbox show / hide output result

For saving the checkbox, one easy way to check, if the checkbox was checked is to use empty() function. The checkbox key and value exists in $_POST only, if it was checked when the form was submitted. For example, function snup_save_meta($post_id) { // nonce check etc. // save text $snupText = $_POST[‘snuptext’] ?? ”; update_post_meta( … Read more