Followed your instructions and created a child theme and added the same folder structure inside the child theme and customized the donate-button.php button, below is the code
<?php
/**
?* Displays the donate button to be displayed on campaign pages.
?*
?*
?* @author ?WP Charitable LLC
?* @package Charitable/Templates/Campaign Page
?* @since ? 1.3.0
?* @version 1.7.0.9
?*/
$campaign = $view_args['campaign'];
$button_style = array_key_exists('button_colour', $view_args) ? 'style="background-color:' . $view_args['button_colour'] . ';"' : '';
$button_text = array_key_exists('button_text', $view_args) ? $view_args['button_text'] : __( 'Donate', 'charitable' );
$show_amount_field = array_key_exists('show_amount_field', $view_args) && $view_args['show_amount_field'];
$button_text = esc_html(get_post_meta($campaign->ID, '_campaign_donate_button_text', true));
$button_text = false === $button_text || '' === trim($button_text) ? __( 'Donate', 'charitable' ) : $button_text;
$external_link = 'https://ssej.networkforgood.com/projects/108337-main-giving-page'; // Your external link URL
?>
<a href="<?php echo esc_url($external_link); ?>" target="_blank" class="<?php echo esc_attr( charitable_get_button_class( 'donate' ) ); ?>"><?php echo wp_strip_all_tags( $button_text ); ?></a>
it still didn’t worked for me still redirecting the donate button to the internal plugin page.
-
This reply was modified 1 year, 2 months ago by haroonahmad.