Skip to content

Instantly share code, notes, and snippets.

@jetsloth
Last active May 11, 2021 00:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jetsloth/7c1af62c6844d1b363b5ecd94d87e23f to your computer and use it in GitHub Desktop.
Save jetsloth/7c1af62c6844d1b363b5ecd94d87e23f to your computer and use it in GitHub Desktop.
Using Gravity PDF gfpdf_field_product_value filter to include Image Choices in the product table
<?php
add_filter("gfpdf_field_product_value", function( $html, $products, $field, $form, $entry, $self ){
if ( !function_exists('gf_image_choices') ) {
return $html;
}
// Update to suit
$image_width = 80;
return gf_image_choices()->gfpdf_ic_field_product_value($html, $products, $field, $form, $entry, $image_width);
}, 10, 6);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment