gpi_approved_payment_statuses

  1. Description
  2. Usage
  3. Parameters
  4. Examples
    1. Add “Processing” as an approved payment status
  5. Since

Description

Filter the payment statuses that should be considered approved before decrementing inventory. If the payment status is NULL, it will always be considered approved.

Usage

add_filter( 'gpi_approved_payment_statuses', 'my_custom_function' );

Parameters

  • valid_statuses array

    An array of valid payment statuses. Defaults to [ 'Approved', 'Paid', 'Active', 'Completed' ]

Examples

Add “Processing” as an approved payment status

add_filter( 'gpi_approved_payment_statuses', function( $statuses ) {

   // Add `Processing` to the array of approved payment statuses
   $statuses[] = 'Processing';

   return $statuses;
} );

Since

This filter is available since Gravity Forms Inventory 1.0-beta-3.21.