mycred_decline_store_purchase

Description

This filter allows you to decline a store purchase where points are used as payment. This filter is usable for all supported shopping cart plugins.

Available since version 1.5

Parameters

Param Type Required Description
$result bool or string Yes

Should return false if the transaction should complete or a string message if the transaction should be declined. This string message is then shown to the user as the reason why the transaction was declined.

$cart array or obj No

This is either the cart object or the order object, depending on the shopping cart plugin used.

$gateway obj No

The gateway object.

Used By

Package Prio. Description
Not used by any built-in package.

Examples

Example 1: Decline point payment in WooCommerce if a user does not have at least 100 point left after payment.