woocommerce ad custom button with custom link after add to cart for every product

As you can see in the wpse_add_custom_link_output callback function this echo the $html variable.

So you can simply replace the following line

$html="<a href="".$external_link.'" class="custom-button-class" target="_blank" title="'.__('External product link','woocommerce').'">'.$external_link.'</a>';

With something like

$html="<button type="button">BUY NOW</button>";

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)