• 1.
    new GW_Inventory( array(
  • 2.
        'form_id' => 123,
  • 3.
        'field_id' => 4.3,
  • 4.
        'stock_qty' => function() {
  • 5.
            global $post;
  • 6.
            return get_post_meta( $post->ID, 'stock', true );
  • 7.
        },
  • 8.
    ) );
new GW_Inventory( array( 'form_id' => 123, 'field_id' => 4.3, 'stock_qty' => function() { global $post; return get_post_meta( $post->ID, 'stock', true ); }, ) );

Copy Code to Clipboard Raw

Sign-in or Create a Free Account.

Snippi uses Twitter or Facebook to register and create accounts. Registration will enable you to keep track of your snippets. We never spam your timeline or wall. Ever.

Sign-in with Facebook Sign-in with Twitter