• hi!

    i want to include a parametric shortcode in additional setting field.
    i want to redirect in a specific page using the on_sent_ok code.

    1. so i create a new short code with my link ( a pp link )

    add_shortcode( ‘link_pp’, ‘gpx_cf7_pp_counter’, true );
    function gpx_cf7_pp_counter( $atts )
    {
    // estraggo i parametri necessari da aggiornare!
    extract( shortcode_atts( array(
    ‘id’ => ‘…’,
    ‘item_name’ => ‘…&’,
    ‘item_number’ => ‘2’,
    ‘amount’ => ‘0%2e00’,
    ‘return_link’ => ‘…’,
    ‘cancel_return_link’ => ‘…’,
    ‘notify_url’ => ‘…’)
    , $atts ) );
    $output = ‘https://www.paypal.com/cgi-bin/webscr?cmd=_xclick&busin…’;
    return $output;
    }

    2. and then i call a do_shortcode on additional setting field in this way:

    add_action(“wpcf7_before_send_mail”, “wpcf7_do_something”);
    function wpcf7_do_something (&$WPCF7_ContactForm) {
    $WPCF7_ContactForm->additional_settings = do_shortcode( $WPCF7_ContactForm->additional_settings );
    }

    But this didn’t work! I forgot something?
    There is a way to include custom shortcode in Additional Settings Field?

    Thanks

    https://www.ads-software.com/plugins/contact-form-7/

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘include shortcode in Additional Settings field’ is closed to new replies.