WP Manifestindependent plugin directory
manifest / social / bmac-multilingual-wordpress

Vygen Buy Me a Coffee Multilingual

WordPress multilingual plugin for Buy Me a Coffee with Polylang support (FR/EN)

by Jimmy - Vygen Solutions · github.com/bigjimofficiel/bmac-multilingual-wordpress · website

0stars
0forks

Install

No release zip yet. The repository archive installs, but the folder name will carry the branch suffix and updates will not flow:

wp plugin install https://github.com/bigjimofficiel/bmac-multilingual-wordpress/archive/refs/heads/main.zip

A WordPress plugin to display a "Buy Me a Coffee" button with multilingual support via Polylang (FR/EN).

📦 Installation

  1. Download the vygen-bmac-multilingual folder
  2. Upload it to /wp-content/plugins/
  3. Activate the plugin in WordPress
  4. Go to Settings → Buy Me a Coffee to configure

⚙️ Configuration

1. Create your Buy Me a Coffee account(s)

Option A: Single account (recommended to start)

  • Create an account at https://buymeacoffee.com
  • Example: buymeacoffee.com/yourname
  • Use the same URL for both FR and EN
  • Edit your Buy Me a Coffee page to be bilingual

Option B: Two separate accounts (ideal)

  • French account: buymeacoffee.com/yourname
  • English account: buymeacoffee.com/yourname-en
  • Configure each URL in the plugin

2. Configure the WordPress plugin

  1. Go to Settings → Buy Me a Coffee
  2. Configure URLs for each language (FR/EN)
  3. Customize texts (optional)
  4. Click Save Settings

3. Use the shortcode

In a post or page:

[vygen_coffee]

In the footer (functions.php or via theme):

<?php echo do_shortcode('[vygen_coffee]'); ?>

In a widget:

  • Add a "Custom HTML" widget
  • Insert the shortcode [vygen_coffee]

🎨 Customization

Modify styles

Edit the /assets/style.css file to customize:

  • Button colors
  • Text size
  • Borders
  • Responsive behavior

Change default texts

Go to Settings → Buy Me a Coffee and modify:

  • Introduction text (FR/EN)
  • Button text (FR/EN)

🌍 Supported Languages

  • 🇫🇷 French
  • 🇬🇧 English

The plugin automatically detects the active language via Polylang.

📋 Usage Examples

At the end of articles

[vygen_coffee]

In the site footer

Edit your footer.php file and add:

<div class="site-footer-coffee">
    <?php echo do_shortcode('[vygen_coffee]'); ?>
</div>

In the sidebar

Add a "Custom HTML" widget with the shortcode.

Automatic display on all posts

Enable the "Automatically display at the end of each post" option in settings.

🔧 Troubleshooting

Shortcode doesn't display?

  • Verify the plugin is activated
  • Check that you configured at least one URL in settings

Wrong text displays?

  • Verify Polylang is installed and configured
  • Check the current page language

Button has no style?

  • Clear your site cache
  • Verify the /assets/style.css file exists

🔒 Security Features

  • Strict URL validation: Only accepts buymeacoffee.com URLs
  • Input sanitization: All user inputs are cleaned before database storage
  • Output escaping: All displayed content is properly escaped
  • Admin-only access: Only administrators can modify settings
  • CSRF protection: Uses WordPress nonces for form security

📝 Changelog

Version 1.1.0

  • ✨ Added automatic display option for posts
  • ✅ Checkbox in settings to enable/disable
  • 🔒 Secure checkbox sanitization

Version 1.0.1

  • Changed FR/NL → FR/EN

Version 1.0.0

  • Initial release
  • FR/NL support via Polylang
  • Admin configuration page
  • Customizable styles

👨‍💻 Author

Jimmy

📄 License

This plugin is licensed under GPL-2.0+. Free to use and modify according to your needs.

🤝 Contributing

Found a bug or have a feature request? Feel free to:

  • Open an issue on GitHub
  • Submit a pull request
  • Leave a comment on the blog post

💡 Related Projects

Check out the Amazon Affiliates multilingual shortcode - similar approach for Amazon affiliate links.

⚙️ Technical Requirements

  • WordPress: 5.0 or higher
  • Polylang: Free or Pro version
  • PHP: 7.4 or higher

🌟 Support

If you find this plugin useful:

  • ⭐ Star it on GitHub
  • Buy me a coffee
  • 💬 Share it with other WordPress developers

Made with ☕ by Vygen Solutions