Skip to content
Snippets Groups Projects
Commit 80b7de37 authored by Lucas García's avatar Lucas García
Browse files

feat: remove wpcf7 form scripts

parent d6780996
No related branches found
No related tags found
1 merge request!2Remove custom fields
......@@ -30,25 +30,6 @@ class Integration extends BaseIntegration
add_filter('wpcf7_before_send_mail', function ($form, &$abort, $submission) {
$this->do_submission($submission, $form);
}, 10, 3);
add_filter('wpcf7_form_elements', function ($tags) {
$plugin_url = plugin_dir_url(dirname(__FILE__, 4) . '/wpct-erp-forms.php');
$script_url = $plugin_url . 'assets/js/wpcf7.js';
ob_start();
?>
<script src="<?= $script_url ?>" type="module"></script>
<style>
.wpcf7-form-control-conditional-wrap {
display: none
}
.wpcf7-form-control-conditional-wrap.visible {
display: block;
}
</style>
<?php
$assets = ob_get_clean();
return $tags . $assets;
}, 90, 1);
}
public function serialize_field($field, $form)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment