Submit the form through ajax

This commit is contained in:
Kelly Dwan 2019-11-20 17:47:42 -05:00
parent 8d63e8d4e6
commit cb571a176b
No known key found for this signature in database
GPG key ID: 8BA5575F3D11575D
6 changed files with 41 additions and 10 deletions

View file

@ -273,7 +273,8 @@ function enqueue_assets() {
wp_enqueue_script( '5ftf-frontend', plugins_url( 'assets/js/frontend.js', __DIR__ ), [ 'jquery', 'wp-util', 'wicg-inert' ], $ver, true );
$script_data = [
'pledgeId' => get_the_ID(),
'ajaxurl' => admin_url( 'admin-ajax.php', 'relative' ), // The global ajaxurl is not set on the frontend.
'pledgeId' => get_the_ID(),
'ajaxNonce' => wp_create_nonce( 'send-manage-email' ),
];
wp_add_inline_script(