Forum Replies Created

Viewing 5 replies - 1 through 5 (of 5 total)
  • Hi Brazen Links

    We recently changed the link to our live demo website. The one you find in the www.remarpro.com site is the current link to our live demo. We did not change the version for this minor change hence you are not getting the notice to update to the new version. Therefore, there is a minor code difference between your plugin and the one in wordpress repo.

    We DO NOT edit our plugin’s code on customer site without their permission and we have not taken any such consent from you.

    The link directs you to a live demo of WSDesk where user’s can try our premium version before they decide to buy it. It is completely safe.

    The change you see does not affect the working of WSDesk in anyway, it is only a marketing content change. If you want to get rid of the notice, you can delete WSDesk and download a new copy of the plugin.

    Regards
    Niladri Das Roy

    Hi
    The following code will not be in a different function. It will be at the begin of the one the main hooked function:

    
    add_filter( 'wpcf7_posted_data', 'filter_wpcf7_posted_data', 10, 1 ); //filter to get posted data from the form
    function filter_wpcf7_posted_data( $posted_data ) {
    
    //Not my desired form? bail
    if ( $contact_form->id !== 459 )
    return;
    //459is the ID of your desired form.
    // Do stuff for my contact form
    
     $url="https://testtuin.dewitonline.nl/wp-admin/admin-ajax.php"; //Full URL of the admin-ajax file.
     $response = wp_remote_post($url,array(
     'method'=>'POST',
    'body' => array(
          'action'=>'wsdesk_api_create_ticket',
          'api_key' => '4adbf7954695625ea25a5deee3b4abd8',
          'request_email' => $posted_data['helpdesk-email'],
          'request_title' => $posted_data['helpdesk-subject'],
          'request_description'=>$posted_data['helpdesk-message'] )
     ));
    
    $response=json_decode($response['body'],true);
     if($response['status']=='success')
     {
    //code if success
    }
     else
     {
    //code if fails
    }
    };
    

    This all the code you will need to add in your function.php
    If you wish to do something after successfully submitting the form or do something in case of an error you can add your custom code instead of “//code if success” and “//code if fails” respectively. These lines are towards the end of function.

    Thank You.

    Hi
    You need to replace $myform_id with the form ID. Please see the snippet below.

    
        if ( $contact_form->id !== 459)
            return;
        // continue with rest of the function here
    

    Thank you

    Hi
    Yes, you can set up multiple forms.
    In the functions.php file, you can add the following snippet in the beginning of the function just to check if the submitted data is from the one you want to use as the support form.

    add_filter( 'wpcf7_posted_data', 'filter_wpcf7_posted_data', 10, 1 ); //filter to get posted data from the form );
    
    function filter_wpcf7_posted_data( $contact_form ) {
    
        // Not my desired form? bail
        if ( $contact_form->id !== $myform_id )
            return;
        //$myform_id is the ID of your desired form.
        // Do stuff for my contact form
    }

    We can help you set it up via screen sharing if you face any trouble. Just raise an issue here.
    Thank you

    Hi hwsiew
    Basic version comes with only these shortcodes:

    • WSDesk support action shortcode [wsdesk_support]
    • WSDesk support form shortcode [wsdesk_support display=form]
Viewing 5 replies - 1 through 5 (of 5 total)