Title: Fixing PHP (Woocommerce custom fields) on Table
Last modified: November 28, 2018

---

# Fixing PHP (Woocommerce custom fields) on Table

 *  [CreativeWP](https://wordpress.org/support/users/creativewp/)
 * (@creativewp)
 * [7 years, 5 months ago](https://wordpress.org/support/topic/fixing-php-old-code-not-supported/)
 * I am working on this site, and I have created new Woocommerce custom fields, 
   location, duration, time.
 * This plugin only allows ONE custom field. And I would like to have the title 
   of the custom fields. Can anyone help me to do this?
 * Here is the code that does this,
 * Thanks,
 *     ```
       /**********************************
        * Product Custom Field
        **********************************/
       add_filter('dp_field_meta','dp_field_customField_cb',10,2);
       function dp_field_customField_cb($id,$col)
       {
           global $product,$dp_meta;
           $custom=get_post_meta($id,$dp_meta['meta_key'],true);
           switch ($dp_meta['type'])
           {
               case 'text' :
                       $output= html_entity_decode($custom);
                   break;
               case 'image' :
                       $output='<img src="'.$custom.'" />';
                   break;
               case 'shortcode' :
                       $output=  do_shortcode($custom);
                   break;
           }
           return $output;
       }
       ```
   
    -  This topic was modified 7 years, 5 months ago by [CreativeWP](https://wordpress.org/support/users/creativewp/).
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Ffixing-php-old-code-not-supported%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 1 replies (of 1 total)

 *  Thread Starter [CreativeWP](https://wordpress.org/support/users/creativewp/)
 * (@creativewp)
 * [7 years, 5 months ago](https://wordpress.org/support/topic/fixing-php-old-code-not-supported/#post-10922435)
 * The client wants something like this,
 * [https://learning.sgs.com/lmt/clmsCatalogSummary.prMain?in_portid=2&in_autoquery=Y&in_orderby=DA&in_region=ca](https://learning.sgs.com/lmt/clmsCatalogSummary.prMain?in_portid=2&in_autoquery=Y&in_orderby=DA&in_region=ca)

Viewing 1 replies (of 1 total)

The topic ‘Fixing PHP (Woocommerce custom fields) on Table’ is closed to new replies.

## Tags

 * [woocommerce custom fields](https://wordpress.org/support/topic-tag/woocommerce-custom-fields/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 1 reply
 * 1 participant
 * Last reply from: [CreativeWP](https://wordpress.org/support/users/creativewp/)
 * Last activity: [7 years, 5 months ago](https://wordpress.org/support/topic/fixing-php-old-code-not-supported/#post-10922435)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
