shopp_checkout_clickwrap_terms

Filters the content of the clickwrap scrolling div generated by the shopp(‘checkout’,’clickwrap’) theme api function.

add_filter( 'shopp_checkout_clickwrap_terms', [callback] )

@param string terms displayed in the clickwrap.
@return string the filtered terms content

Description

Filters the content of the clickwrap scrolling div generated by the shopp(‘checkout’,’clickwrap’) theme api function.

Examples

// register filter callback
add_filter('shopp_checkout_clickwrap_terms', 'clickwrap_terms', 10, 1);

// create filter function
function clickwrap_terms( $terms ) {

    // make the content secure
    $filtered = esc_html($terms);

    return $filtered;
}
// register filter callback
add_filter('shopp_checkout_clickwrap_terms', 'default_clickwrap_terms', 10, 1);

// create filter function
function default_clickwrap_terms( $terms ) {

    // use default terms if no terms are currently set
    if ( empty($terms) ) {
        // a WordPress page with the slug default-terms
        $page = get_page_by_path('default-terms');
        $terms = $page->post_content;
    }

    return $terms;
}

See Also

You must be logged in to post a comment.

© Ingenesis Limited. Shopp™ is a registered trademark of Ingenesis Limited.

Skip to toolbar