• I have an Element Form in https://sparkignitepro3.com/irongrip/
    And it is used to redirect after I fill the form.
    But it doesn’t redirect after I install Paystack plugin.

    I use this code snippet to redirect with Elementor Form.
    add_action( ‘elementor_pro/forms/new_record’, function( $record, $handler ) {
    $handler->data[‘output’] = $redirectURL;
    }, 10, 2 );

    Does this add_action is overwritten by PayStack plugin?

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter skydev2020

    (@skydev2020)

    I checked the PayStack Forms plugin code and it works if I disable this line.
    $this->loader->add_action(‘wp_enqueue_scripts’, $plugin_public, ‘enqueue_scripts’);
    in includes/class-paystack-forms.php define_public_hooks() function

    Thread Starter skydev2020

    (@skydev2020)

    Looks like this is the reason.

    public function enqueue_scripts()
        {
            wp_enqueue_script('blockUI', plugin_dir_url(__FILE__) . 'js/jquery.blockUI.min.js', array('jquery'), $this->version, true, true);
            wp_enqueue_script('jquery-ui-core');
            wp_register_script('Paystack', 'https://js.paystack.co/v1/inline.js', false, '1');
            wp_enqueue_script('Paystack');
            wp_enqueue_script('paystack_frontend', plugin_dir_url(__FILE__) . 'js/paystack-forms-public.js', array('jquery'), $this->version, true, true);
            wp_localize_script('paystack_frontend', 'kkd_pff_settings', array('key' => Kkd_Pff_Paystack_Public::fetchPublicKey(), 'fee' => Kkd_Pff_Paystack_Public::fetchFeeSettings()), $this->version, true, true);
        }
    • This reply was modified 2 years, 10 months ago by skydev2020.
    • This reply was modified 2 years, 10 months ago by skydev2020.
    Thread Starter skydev2020

    (@skydev2020)

    I found the reason.
    Uncaught TypeError: $(…).datepicker is not a function
    From paystack-forms.public.js

    $(".date-picker").datepicker({
              dateFormat: "mm/dd/yy",
              prevText: '<i class="fa fa-caret-left"></i>',
              nextText: '<i class="fa fa-caret-right"></i>'
            });

    Why do we have this error and how to solve it?

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘It breaks the elementor form redirection’ is closed to new replies.