Filter
rpress_ajax_script_vars
On this page
Filters the data localised to the AJAX script.
Runs in RP_Frontend_Scripts::load_scripts() before the array is localised to the rp-ajax script as the rpress_scripts JavaScript object. The array holds the checkout nonce, loading text and various messages used by the AJAX handlers.
Parameters#
| Parameter | Type | Description |
|---|---|---|
$ajax_vars | array | Data for the rpress_scripts JavaScript object. |
Return value#
array. The data for the rpress_scripts object.
Example#
function my_ajax_script_vars( $vars ) {
$vars['blurtxt'] = __( 'Please wait while we process your order.', 'my-textdomain' );
return $vars;
}
add_filter( 'rpress_ajax_script_vars', 'my_ajax_script_vars' );
Source#
Applied in:
includes/class-rpress-frontend-scripts.php(line 475), inRP_Frontend_Scripts::load_scripts()
See also#
Was this page helpful?
