View Single Post
  #6  
Old March 30th, 2011, 11:17 AM
Eric's Avatar
Eric Eric is offline
Datafeedr Team
 
Join Date: Feb 2008
Posts: 16,902
Default

Hi

First you will need to get the custom field for the product ID. You can use the Custom Fields API to get that info.

Once you have the $drip_post_id, then you could do something like this:

$product_id = $wpdb->get_var("SELECT id FROM ".$wpdb->prefix."dfr_shop_products WHERE id = ".$drip_post_id);

And then $product_id should equal an ID or false.