I tried to use the option “Use a custom Button” but that must be for another kind of button. Because the button showing in the login form stays the same.
Actually, I just need to change the language of the button, but it’s an img tag so I don’t think I can do this with css
function my_custom_login_button( $button_html, $href ) {
// Change the URL of the image to your desired image.
$new_image_url = site_url() . '/wp-content/uploads/2023/02/patreon-login-button.png';
// Replace the existing image URL with the new image URL.
$button_html = str_replace( PATREON_PLUGIN_ASSETS . '/img/patreon-logomark-on-coral.svg', $new_image_url, $button_html );
return $button_html;
}
add_filter( 'ptrn/login_button', 'my_custom_login_button', 10, 2
);
but it create a fatal error in frontend
I am not so sure that filter is the right place to look? Because it mentions
/img/patreon-logomark-on-coral.svg
but the image I am actually trying to swap is
/wp-content/plugins/patron-plugin-pro/plugin/lib/patreon-connect/assets/img/patreon%20login@1x.png
In the end I just switched the original images, and will keep switching them with every update of the plugin .
But don’t you think it would be better to have the possibility to add custom buttons from the plugin settings?
Or maybe create buttons that have real text that can be translated.
I tried to use that feature but it doesn’t work for me.
Plus, there are 2 separate button images, one is “connect your Patreon” the other one is “login with Patreon”
The “use a custom button” settings i Patron PRO plugin only allow changing the “login with Patreon” button. But again, I tried to use it, and it does nothing for me.
Not a big issue, I can keep updating the images manually every time I update the plugin, but maybe look into it for future releases.
May be a Patron Pro bug. Ill look into this for near future releases. For the time being, you can use the filters to override it. Patron Pro should allow hooking into every single function that it has and it should allow you to run actions and filter variables before and after a function runs.