ID, 'file_path', true); $field = array( 'id' => 'file_path', 'label' => 'File path:' ); echo '

'.ABSPATH.'

'; // Download Limit $download_limit = get_post_meta($post->ID, 'download_limit', true); $field = array( 'id' => 'download_limit', 'label' => 'Download Limit:' ); echo '

Leave blank for unlimited re-downloads.

'; ?>
'.__('Downloadable','jigoshop').''; } add_action('product_type_selector', 'downloadable_product_type_selector'); /** * Process meta * * Processes this product types options when a post is saved * * @since 1.0 * * @param array $data The $data being saved * @param int $post_id The post id of the post being saved */ function process_product_meta_downloadable( $data, $post_id ) { if (isset($_POST['file_path']) && $_POST['file_path']) update_post_meta( $post_id, 'file_path', $_POST['file_path'] ); if (isset($_POST['download_limit']) && $_POST['download_limit']) update_post_meta( $post_id, 'download_limit', $_POST['download_limit'] ); return $data; } add_filter('process_product_meta_downloadable', 'process_product_meta_downloadable', 1, 2);