Skip to content

Commit fbccf0d

Browse files
committed
gpi-show-current-inventory-on-entries-list.php: Added support for showing inventory of choices populated by Populate Anything.
1 parent ac24f88 commit fbccf0d

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

gp-inventory/gpi-show-current-inventory-on-entries-list.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,11 @@
1919

2020
$message_content = '<strong>' . __( 'Current Inventory:', 'gp-inventory' ) . '</strong><ul style="margin-top: .5rem;padding: 0 0 0 2rem;">';
2121

22+
// Hydrate choices if using Populate Anything
23+
if ( function_exists( 'gp_populate_anything' ) ) {
24+
$form = gp_populate_anything()->modify_admin_field_choices( $form );
25+
}
26+
2227
foreach ( gp_inventory_type_simple()->get_applicable_fields( $form, true ) as $inventory_field ) {
2328

2429
if ( isset( $inventory_field->choices ) && is_array( $inventory_field->choices ) ) {

0 commit comments

Comments
 (0)