Gravity Wiz // Gravity Forms // Better Inventory // Limit by ACF Custom Field
<?php
/**
* Gravity Wiz // Gravity Forms // Better Inventory // Limit by ACF Custom Field
* https://gravitywiz.com/better-inventory-with-gravity-forms/
*/
add_filter( 'wp', function() {
if( function_exists( 'get_field' ) ) {
$gwinv = new GW_Inventory( array(
'form_id' => 123,
'field_id' => 1.3,
'stock_qty' => get_field( 'YOUR_CUSTOM_FIELD' ),
) );
$gwinv->init();
}
} );