Hi @iftikharalam
Kindly add below code to your theme functions.php file.
/**
* Enables the Excerpt meta box in Page edit screen.
*/
function _edd_add_post_type_support() {
add_post_type_support( 'download', 'custom-fields' );
}
add_action( 'init', '_edd_add_post_type_support' );
/**
* Display product demo link
*/
function _edd_purchase_link_end( $download_id, $args ) {
$demo_link = get_post_meta( $download_id, 'edd_demo_link', true );
if( $demo_link ) {
echo '<a href="'.esc_url( $demo_link ).'" class="button blue" target="_blank">'.__('Demo Link').'</a>';
}
}
add_action( 'edd_purchase_link_end', '_edd_purchase_link_end', 10, 2 );
Once you add code and save it then you can see “Custom Fields” metabox section at product add / edit screen. In that you need to add product demo link so meta name will be “edd_demo_link” and value will be your demo link. Please refer below screenshot
https://screenshots.firefox.com/YFN4mxyfu9vqJiL9/192.168.1.53
A demo URL button will be added to after EDD Product purchase button.