• Plugin Author Mário Valney

    (@mariovalney)


    Since 3.0.0 we accept placeholders in webhook URL.

    • The value will be “url encoded”.
    • Lists/arrays (multiple selected checkboxes, for example) will be separated by pipe “|” .
    • Support select with pipes.

    For example:

    https://example.com/[your-email]/?user_ids=[users]

    Will be sent to:

    https://example.com/email%40example.com/?user_ids=1|2|4

    If your form has [your-email] field with “email@example.com” value and a checkbox list for [users] with “1”, “2” and “4” selected.

Viewing 1 replies (of 1 total)
  • Plugin Author Mário Valney

    (@mariovalney)

    To avoid values to be URL encoded, you can use ctz_hook_url_placeholder filter to change the returned value.

    <?php
    
    add_filter( 'ctz_hook_url_placeholder', 'example_ctz_hook_url_placeholder', 10, 4 );
    
    function example_ctz_hook_url_placeholder( $value, $placeholder, $key, $data ) {
        if ( $key === 'your-key' ) {
            return $data[ $key ];
        }
    
        return $value;
    }

Viewing 1 replies (of 1 total)
  • The topic ‘Use webhook URL placeholders’ is closed to new replies.