Skip to content

trecenode/woocommerce-allergens

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

18 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Allergens System for WooCommerce

WordPress Plugin Version WordPress WooCommerce PHP License

A comprehensive WordPress plugin that adds allergen information to WooCommerce products with full WPML and page builder compatibility.

πŸ“‹ Description

This plugin adds allergens to each product in your WooCommerce store, helping you comply with food labeling regulations and inform your customers about potential allergens.

✨ Features

  • βœ… Add allergens to simple and variable products
  • 🎨 Display allergens with customizable icons (Classic or Trece theme)
  • 🌍 Full WPML compatibility - allergens automatically copy to translations
  • πŸ—οΈ Page builder compatible (Oxygen, Elementor, Bricks, Divi, etc.)
  • ⚑ Pure JavaScript system for maximum compatibility (no template overrides)
  • β™Ώ Accessibility friendly with proper ARIA labels
  • πŸ“‚ Custom tab in product admin for easy management
  • πŸ‘¨β€πŸ’» Developer-friendly function for custom themes: treceafw_show_allergens_out()

πŸš€ Installation

  1. Upload the allergens-woocommerce plugin folder to the /wp-content/plugins/ directory
  2. Activate the plugin through the 'Plugins' menu in WordPress
  3. Configure allergen icons under WooCommerce > Allergens
  4. Start adding allergens to your products!

πŸ‘¨β€πŸ’» For Developers

Use the treceafw_show_allergens_out($product) function to display allergens in your custom theme or plugin:

<?php
if (function_exists('treceafw_show_allergens_out')) {
    echo treceafw_show_allergens_out($product);
}
?>

For more information, see DEVELOPER-GUIDE.md

🌍 WPML Compatibility

When using WPML, allergen settings are automatically copied to product translations. No need to manually reconfigure allergens for each language - they will be inherited from the original product.

Key features:

  • Automatic synchronization on product save
  • Works with simple and variable products
  • Auto-configuration via wpml-config.xml

See WPML-COMPATIBILITY.md for more details.

πŸ—οΈ Page Builder Compatibility

Works seamlessly with modern page builders:

  • βœ… Oxygen Builder
  • βœ… Elementor
  • βœ… Bricks Builder
  • βœ… Divi Builder
  • βœ… And any other page builder!

Uses pure JavaScript to dynamically inject allergens, avoiding template conflicts.

πŸ“Έ Screenshots

Product Page

🎨 Credits

  • Classic Icons: Allergen icons by Icon Icons (link)
  • Trece Icons: By 13Node (13node.com)

πŸ“ Changelog

1.6.2

  • Fixed fatal error: Call to a member function is_type() on string
  • Added proper validation for $product object before calling methods

1.6.1

  • Documentation improvements
  • GitHub README.md added

1.6.0

  • Page Builder Compatibility: Works with Oxygen, Elementor, Bricks, Divi, etc.
  • Pure JavaScript system for maximum compatibility (no template overrides)
  • Dynamic allergen display using WooCommerce events
  • Re-added treceafw_show_allergens_out() function for custom themes/plugins
  • Simplified codebase - removed template override system

1.5.0

  • WPML Compatibility: Allergens now automatically copy to product translations
  • Auto-configuration of WPML custom fields for allergens
  • Support for variable products with WPML
  • Added wpml-config.xml for automatic field configuration

1.4.0

  • Accessibility fixes and icon design options under WooCommerce > Allergens

1.3.5.1

  • Better view in smaller screens
  • Fixed PHP error in some WordPress installations

1.3.4

  • CSS Hotfix

1.3.3

  • Hotfix: not deleting on variation

1.3.2

  • Added Pistachio allergen
  • Better CSS in variations
  • Added treceafw_show_allergens_out() function for developers

1.3.1

  • CSS fixes
  • Now doesn't replace the short description

1.3

  • Added allergens for variations
  • Added custom tab for allergens

1.2

  • Better code structure and function names

1.1

  • Added missing allergen icons

1.0

  • Initial release

πŸ“§ Support

We do web development and if you need a developer or if you think you have found a bug in the plugin, please feel free to contact us at info@13node.com

πŸ“„ License

This plugin is licensed under the GPLv2 or later. https://www.gnu.org/licenses/gpl-2.0.html

About

Show Allergens in your Woocommerce product page.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors