Skip to content
Docs
Get RestroPress

Filter

rpress_is_ajax_enabled

Updated
On this page

Filters whether RestroPress AJAX is considered enabled for the cart.

Returns the inverse of rpress_is_ajax_disabled() by default. Used by code that needs to know whether to rely on AJAX cart behaviour.

Parameters#

ParameterTypeDescription
$retvalboolTrue when AJAX is not disabled.

Return value#

bool. Whether AJAX is enabled.

Example#

function my_ajax_enabled( $enabled ) {
	return $enabled;
}
add_filter( 'rpress_is_ajax_enabled', 'my_ajax_enabled' );

Source#

Applied in:

  • includes/rp-ajax-functions.php (line 27), in rpress_is_ajax_enabled()

See also#

Was this page helpful?