{"id":40639862,"url":"https://github.com/verygoodplugins/wp-fusion-custom-snippets","last_synced_at":"2026-01-21T08:02:06.429Z","repository":{"id":317555005,"uuid":"1053029146","full_name":"verygoodplugins/wp-fusion-custom-snippets","owner":"verygoodplugins","description":"Custom code snippets for WP Fusion","archived":false,"fork":false,"pushed_at":"2025-10-01T15:40:18.000Z","size":83,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-10-01T17:34:01.698Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/verygoodplugins.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-09-08T22:23:21.000Z","updated_at":"2025-10-01T15:40:21.000Z","dependencies_parsed_at":"2025-10-01T17:34:03.760Z","dependency_job_id":"7c0cb3ff-ba94-4581-816b-2f8918cd3f08","html_url":"https://github.com/verygoodplugins/wp-fusion-custom-snippets","commit_stats":null,"previous_names":["verygoodplugins/wp-fusion-custom-snippets"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/verygoodplugins/wp-fusion-custom-snippets","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/verygoodplugins%2Fwp-fusion-custom-snippets","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/verygoodplugins%2Fwp-fusion-custom-snippets/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/verygoodplugins%2Fwp-fusion-custom-snippets/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/verygoodplugins%2Fwp-fusion-custom-snippets/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/verygoodplugins","download_url":"https://codeload.github.com/verygoodplugins/wp-fusion-custom-snippets/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/verygoodplugins%2Fwp-fusion-custom-snippets/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28629922,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-21T04:47:28.174Z","status":"ssl_error","status_checked_at":"2026-01-21T04:47:22.943Z","response_time":86,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-01-21T08:02:04.288Z","updated_at":"2026-01-21T08:02:06.394Z","avatar_url":"https://github.com/verygoodplugins.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# WP Fusion Custom Snippets\n\n\u003cdiv align=\"center\"\u003e\n\n![WP Fusion Logo](https://wpfusion.com/wp-content/uploads/2019/08/logo-top-svg.svg)\n\n**🚀 Extend the Power of WordPress's #1 Marketing Automation Plugin**\n\n[![WordPress Sites](https://img.shields.io/badge/Powering-38%2C000%2B%20Sites-orange)](https://wpfusion.com?utm_source=github\u0026utm_medium=readme\u0026utm_campaign=custom-snippets)\n[![CRMs Supported](https://img.shields.io/badge/CRMs%20Supported-60%2B-blue)](https://wpfusion.com/documentation/getting-started/crm-compatibility/?utm_source=github\u0026utm_medium=readme\u0026utm_campaign=custom-snippets)\n[![Plugin Integrations](https://img.shields.io/badge/Plugin%20Integrations-150%2B-green)](https://wpfusion.com/documentation/?utm_source=github\u0026utm_medium=readme\u0026utm_campaign=custom-snippets)\n[![License](https://img.shields.io/badge/License-GPL%20v3-lightgrey)](LICENSE)\n\nA curated collection of custom code snippets to extend and enhance WP Fusion functionality. Ready-to-use solutions that unlock even more possibilities for your marketing automation workflows.\n\n[Get WP Fusion](https://wpfusion.com/pricing/?utm_source=github\u0026utm_medium=readme\u0026utm_campaign=custom-snippets) | [Documentation](https://wpfusion.com/documentation/?utm_source=github\u0026utm_medium=readme\u0026utm_campaign=custom-snippets) | [Support](https://wpfusion.com/contact/?utm_source=github\u0026utm_medium=readme\u0026utm_campaign=custom-snippets) | [Join Community](https://www.facebook.com/groups/wpfusion/)\n\n\u003c/div\u003e\n\n---\n\n## 🎯 What is WP Fusion?\n\n**WP Fusion** is the most powerful and flexible marketing automation plugin for WordPress. It connects your WordPress site to your CRM or marketing automation platform, creating seamless two-way data sync that transforms how you engage with your audience.\n\n### Why 38,000+ Sites Trust WP Fusion\n\n- **🔌 60+ CRM Integrations** - From HubSpot to ActiveCampaign, Salesforce to Mailchimp, we've got you covered\n- **🧩 150+ Plugin Integrations** - Deep integration with WooCommerce, LearnDash, MemberPress, BuddyBoss, and more\n- **⚡ Real-Time Sync** - Instant data synchronization keeps your CRM always up-to-date\n- **🎯 Smart Automation** - Trigger actions based on user behavior, purchases, course progress, and more\n- **🔒 Content Personalization** - Show different content to different users based on CRM tags\n- **🛠️ Developer Friendly** - Extensive hooks, filters, and this snippet library for endless customization\n\n### The Power of Open Source\n\nWP Fusion isn't just a plugin—it's a platform. Built on WordPress's open architecture, it's infinitely extensible through custom code. This repository showcases that extensibility with battle-tested snippets from our community of developers and power users.\n\n## 📋 Table of Contents\n\n- [Quick Start](#-quick-start)\n- [Installation Methods](#-installation-methods)\n- [Snippet Categories](#-snippet-categories)\n- [Featured Snippets](#-featured-snippets)\n- [Usage Guidelines](#-usage-guidelines)\n- [Contributing](#-contributing)\n- [Resources \u0026 Support](#-resources--support)\n\n## 🚀 Quick Start\n\nGet up and running in minutes:\n\n1. **Have WP Fusion installed** ([Get it here](https://wpfusion.com/pricing/?utm_source=github\u0026utm_medium=readme\u0026utm_campaign=custom-snippets) or start with [WP Fusion Lite](https://wordpress.org/plugins/wp-fusion-lite/))\n2. **Browse our [snippet categories](#-snippet-categories)** to find what you need\n3. **Choose an [installation method](#-installation-methods)** that fits your workflow\n4. **Copy, customize, and deploy** - Each snippet includes detailed documentation\n\n## 🛠️ Installation Methods\n\nThree ways to add these snippets to your site - choose what works best for you:\n\n### Method 1: functions.php File\n\n**Best for:** Quick testing, simple customizations\n\nAdd snippets directly to your theme's `functions.php`:\n\n```php\n// Add to your theme's functions.php (preferably in a child theme)\nadd_action( 'wpf_tags_modified', 'my_custom_function', 10, 2 );\nfunction my_custom_function( $user_id, $tags ) {\n    // Your custom logic here\n}\n```\n\n⚠️ **Pro tip:** Always use a child theme to preserve customizations during updates\n\n### Method 2: Custom Plugin\n\n**Best for:** Production sites, version control, portability\n\nCreate a custom plugin for your snippets:\n\n```php\n\u003c?php\n/**\n * Plugin Name: WP Fusion Custom Extensions\n * Description: Custom functionality extending WP Fusion\n * Version: 1.0.0\n * Author: Your Name\n */\n\n// Prevent direct access\nif ( ! defined( 'ABSPATH' ) ) {\n    exit;\n}\n\n// Your custom snippets here\n```\n\nSave as `/wp-content/plugins/wpf-custom/wpf-custom.php` and activate\n\n### Method 3: FluentSnippets Plugin\n\n**Best for:** Non-developers, conditional logic, easy management\n\n1. Install [FluentSnippets](https://wordpress.org/plugins/easy-code-manager/)\n2. Add snippets through the visual interface\n3. Set conditions and manage activation states\n4. Zero database queries - snippets stored as files\n\n## 📁 Snippet Categories\n\nOrganized by functionality for easy discovery:\n\n### 🔐 [Access Control](./snippets/access-control/)\nManage content restrictions, redirects, and user permissions\n- LearnDash redirects, IP-based unlocks, login customizations\n\n### 📊 [Activity Tracking](./snippets/activity-tracking/)\nAdvanced user behavior tracking and attribution\n- UTM tracking, lead source sync, engagement metrics\n\n### 🔧 [API Extensions](./snippets/api-extensions/)\nEnhance WP Fusion's API capabilities\n- Performance optimizations, webhook management, custom methods\n\n### 🤖 [Automation Workflows](./snippets/automation-workflows/)\nCreate sophisticated automation triggers\n- Pageview tracking, visit-based tags, content engagement\n\n### 💳 [E-commerce Integration](./snippets/ecommerce-integration/)\nWooCommerce and e-commerce enhancements\n- Subscription tracking, custom order statuses, event sync\n\n### 👥 [User Management](./snippets/user-management/)\nUser data handling and personalization\n- Dynamic styling, custom fields, role management\n\n[View all 20+ snippets →](./snippets/)\n\n## ⭐ Featured Snippets\n\nPopular solutions from our community:\n\n### 🛒 [WooCommerce Subscription Signup Tracking](./snippets/ecommerce-integration/woocommerce-subscription-signup-tracking-hubspot.md)\nTrack new subscriptions in HubSpot with timestamps for time-based reporting\n\n### 🎓 [LearnDash Previous Page Redirect](./snippets/access-control/learndash-previous-page-redirect.md)\nSmart redirects that remember where users came from\n\n### ⚡ [Non-Blocking Login API Calls](./snippets/api-extensions/non-blocking-login-api-calls.md)\nSpeed up login times with slow CRMs\n\n### 🔄 [Webhook Loopback Prevention](./snippets/api-extensions/webhook-loopback-prevention.md)\nPrevent infinite webhook loops in your automations\n\n## 📖 Usage Guidelines\n\n### Before Installing Any Snippet:\n\n✅ **Always:**\n- Create a full backup\n- Test on staging first\n- Read the documentation\n- Check WP Fusion version compatibility\n\n❌ **Never:**\n- Test on production sites\n- Mix incompatible snippets\n- Ignore error messages\n\n### Best Practices:\n\n```php\n// Always check dependencies\nif ( ! class_exists( 'WP_Fusion' ) ) {\n    return;\n}\n\n// Use proper namespacing\nif ( ! function_exists( 'wpf_custom_function' ) ) {\n    function wpf_custom_function() {\n        // Your code here\n    }\n}\n```\n\n## 🤝 Contributing\n\nWe love contributions from our community! Here's how to share your snippets:\n\n1. Fork this repository\n2. Create a feature branch (`git checkout -b feature/amazing-snippet`)\n3. Add your snippet with documentation\n4. Test thoroughly\n5. Submit a pull request\n\n**Contribution must include:**\n- Clear documentation\n- Usage examples\n- Compatibility notes\n- Test coverage\n\n## 📚 Resources \u0026 Support\n\n### Documentation\n- 📖 [Getting Started Guide](https://wpfusion.com/documentation/getting-started/?utm_source=github\u0026utm_medium=readme\u0026utm_campaign=custom-snippets)\n- 🔌 [CRM Setup Guides](https://wpfusion.com/documentation/getting-started/installation-guide/?utm_source=github\u0026utm_medium=readme\u0026utm_campaign=custom-snippets)\n- 🛠️ [Developer Documentation](https://wpfusion.com/documentation/?utm_source=github\u0026utm_medium=readme\u0026utm_campaign=custom-snippets#advanced-developer-tutorials)\n- 🎨 [Brand Assets](https://wpfusion.com/brand-assets/?utm_source=github\u0026utm_medium=readme\u0026utm_campaign=custom-snippets)\n\n### Getting Help\n- 💬 [Facebook Community](https://www.facebook.com/groups/wpfusion/) - 5,000+ members strong\n- 📧 [Priority Support](https://wpfusion.com/support/?utm_source=github\u0026utm_medium=readme\u0026utm_campaign=custom-snippets) - For license holders\n- 🐛 [GitHub Issues](../../issues) - Bug reports and feature requests\n- 📺 [YouTube Tutorials](https://www.youtube.com/@wpfusion) - Video walkthroughs\n\n## 💰 Pricing \u0026 Plans\n\n### WP Fusion Lite (Free)\n- ✅ 60+ CRM integrations\n- ✅ User data sync\n- ✅ Basic automation\n- [Get it on WordPress.org](https://wordpress.org/plugins/wp-fusion-lite/)\n\n### WP Fusion Pro\n- ✅ Everything in Lite\n- ✅ 150+ plugin integrations\n- ✅ Advanced automation\n- ✅ E-commerce tracking\n- ✅ Priority support\n- ✅ 30-day money-back guarantee\n\n[View Pricing →](https://wpfusion.com/pricing/?utm_source=github\u0026utm_medium=readme\u0026utm_campaign=custom-snippets)\n\n## ⚠️ Disclaimer\n\nThese snippets are provided as-is for educational and development purposes. Always test in a staging environment before implementing on production sites. The authors are not responsible for any issues that may arise from using these code snippets.\n\n## 📄 License\n\nThis project is licensed under the GPL v3 or later - see the [LICENSE](LICENSE) file for details.\n\n---\n\n\u003cdiv align=\"center\"\u003e\n\n**Built with 🧡 by [Jack Arturo](https://github.com/verygoodplugins) at [Very Good Plugins](https://verygoodplugins.com?utm_source=github\u0026utm_medium=readme\u0026utm_campaign=custom-snippets)**\n\n*Made with love for the WordPress open-source community*\n\n[Website](https://wpfusion.com?utm_source=github\u0026utm_medium=readme\u0026utm_campaign=custom-snippets) • [Documentation](https://wpfusion.com/documentation/?utm_source=github\u0026utm_medium=readme\u0026utm_campaign=custom-snippets) • [Support](https://wpfusion.com/contact/?utm_source=github\u0026utm_medium=readme\u0026utm_campaign=custom-snippets) • [Facebook Group](https://www.facebook.com/groups/wpfusion/)\n\n\u003c/div\u003e","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fverygoodplugins%2Fwp-fusion-custom-snippets","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fverygoodplugins%2Fwp-fusion-custom-snippets","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fverygoodplugins%2Fwp-fusion-custom-snippets/lists"}