Creating a WordPress addon for ContactForm7 submission (.XML file export)

The file is not created, because the function my_generate_xml exists, but is never called. All that code looks correct. The only problem is that you have to call the function that generates the XML file… add_action(‘wpcf7_before_send_mail’, ‘my_get_form_values’); function my_get_form_values($contact_form) { // get info about the form and current submission instance $formTitle = $contact_form->title(); $submission = … Read more

How to update option field in database on clicking the publish button in customizer

When ‘publish’ is clicked in customizer, the option ‘theme_mods_THEMENAMED’ is updated. An function/action could be added See https://developer.wordpress.org/reference/functions/add_action/ on the wordpress actions add_option_(option_name) and update_option_(option_name) See https://codex.wordpress.org/Plugin_API/Action_Reference#Administrative_Actions. The new function could then save what ever option you want to update.