=== Boma Pet Nutrition Pro ===
Contributors: bomasoftware
Tags: woocommerce, product recommendations, guided selling, pet food, nutrition calculator
Requires at least: 6.9
Tested up to: 7.1
Requires PHP: 8.1
Stable tag: 1.3.1.7
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Pet nutrition calculator for dogs and cats, with optional WooCommerce product recommendations, feeding amounts and guided selling for pet food stores.

== Description ==

Pet Nutrition Pro turns a WooCommerce pet food catalog into a nutrition-based guided selling experience for dogs and cats.

Customers enter the pet profile and food preferences. The free workflow provides an indicative daily calorie requirement and printable nutrition summary. With the optional Diet Engine service active, the same flow can match the profile with compatible WooCommerce products, calculate daily feeding amounts and connect recommendations to the cart.

The calorie calculator is the entry point: Pet Nutrition Pro connects pet profile data, nutrition calculation, product compatibility and WooCommerce purchasing in one guided flow.

= Main features =

* Public nutrition form for dogs and cats.
* Indicative daily calorie requirement.
* Printable result with browser Save as PDF.
* WooCommerce pet-food compatibility settings.
* Dry, Puffed and Wet food groups.
* Compatibility rules based on pet profile, food exclusions and sensitivities.
* Merchant priority among compatible products.
* Responsive Appearance and Layout controls.
* Optional recommendations, feeding amounts and cart integration with Diet Engine.

= Free plugin and Diet Engine =

Pet Nutrition Pro is GPL-licensed and can be installed without purchasing Diet Engine.

The free workflow includes the dog and cat profile, indicative calorie calculation, printable summary, optional pet photo for the current browser session, WooCommerce product configuration and Appearance and Layout controls.

Calorie calculation uses the Pet Nutrition Pro remote service and requires explicit authorization by the site administrator. Authorization does not activate a paid plan.

Diet Engine is an optional paid remote service that adds compatible WooCommerce product matching, calculated daily feeding amounts and advanced recommendation/cart integration. Payment is for remote service access, not for unlocking locally installed PHP code.

Without Diet Engine, recommendations, calculated feeding amounts and the advanced cart workflow are unavailable. The free calorie calculation and printable summary remain available when the remote connection is authorized.

= WooCommerce guided selling =

Participating products can be configured with food group, kcal per 100 g, dog/cat eligibility, applicable size/life-stage/profile settings, food exclusions, sensitivities and merchant priority.

A product marked as available for the diet is not automatically recommended. Compatibility is evaluated first; merchant priority applies only among compatible products.

With Diet Engine active:

1. The customer enters the pet profile and food preferences.
2. Pet Nutrition Pro calculates the indicative daily energy requirement.
3. Incompatible configured products are excluded.
4. Merchant priority is applied among compatible products.
5. Diet Engine returns selected products and calculated daily feeding amounts.
6. The customer can continue to WooCommerce products and cart.

Dry and Puffed groups normally return one product. Wet food can return multiple compatible products up to the configured maximum.

= Stores, agencies and developers =

Pet Nutrition Pro is designed for WooCommerce pet food stores and for agencies or developers building those stores.

Store owners choose participating products, compatibility criteria and priority among compatible items.

Public shortcodes:

* `[bomapnp_pet_nutrition_form]` - dog and cat profile form.
* `[bomapnp_resulting_diet]` - nutrition result and, with Diet Engine active, recommended products and feeding amounts.

Appearance and Layout controls responsive presentation and optional store/agency branding. A custom CSS class supports project-specific styling without changing nutrition or Diet Engine logic.

= Important nutrition notice =

Pet Nutrition Pro is an informational product-selection tool. It does not diagnose medical conditions, prescribe veterinary diets, or replace professional veterinary advice.

= Languages =

The plugin interface is available in Italian, English (US and UK), French, German, Spanish, Portuguese (Portugal) and Portuguese (Brazil).

The plugin package does not bundle compiled `.po`/`.mo` translation catalogs. WordPress.org language packs for the `boma-pet-nutrition-pro` text domain take precedence when available; a validated built-in localization fallback preserves the currently supported interface languages when a language pack is unavailable.

== External Service ==

Pet Nutrition Pro communicates with a remote service operated by Boma Software.

API host:
https://ms-sql.it/dbconnect/

The service is used for the indicative calorie calculation and, when Diet Engine is active, compatible product recommendations, feeding amounts, priority data and the advanced WooCommerce result.

The connection is used only after explicit authorization by the site administrator.

= Data sent from the pet form =

Depending on the selected profile, the service can receive:

* pet name;
* species, sex, age and weight;
* size/profile range where applicable;
* activity, body condition and sterilization status;
* pregnancy or lactation where applicable;
* selected exclusions, intolerances, sensitivities and food preferences;
* technical site identifier.

= WooCommerce product data sent =

The full WooCommerce catalog is not synchronized automatically. For participating products, the service can receive:

* WooCommerce product ID and title;
* Dry, Puffed or Wet group;
* kcal per 100 g;
* dog/cat and profile compatibility settings;
* configured exclusions and sensitivities;
* merchant ordering values;
* technical site identifier.

= Data kept local =

The optional pet photo remains in the browser for the current result. It is not uploaded to the Media Library, saved in the WordPress database or sent to the remote service.

Print / Save as PDF uses the browser print function and does not send the result to an external PDF service.

The site owner is responsible for an appropriate privacy notice for the actual website configuration and applicable law.

Privacy Policy: https://www.petnutritionpro.com/privacy-policy/
Terms of Service: https://www.petnutritionpro.com/termini-e-condizioni/

Pet Nutrition Pro also includes a Remote Service and Privacy admin screen and suggested privacy-policy content for the WordPress privacy tools.

== Installation ==

1. Install and activate WooCommerce and Pet Nutrition Pro.
2. Open Pet Nutrition Pro > Getting started and review Remote Service and Privacy.
3. Authorize the remote connection to enable calorie calculation.
4. Create or verify the pages with `[bomapnp_pet_nutrition_form]` and `[bomapnp_resulting_diet]`.
5. Select the result page in Pet Nutrition Pro settings.
6. Configure participating WooCommerce products.
7. Adjust Appearance and Layout if needed.
8. Test the complete flow as a logged-out visitor.

Installing the plugin does not activate a paid Diet Engine plan.

If Diet Engine has just been activated or renewed, click "Refresh service check" in Pet Nutrition Pro settings to refresh the cached service status immediately.

== Video Demos ==

For pet food stores and manufacturers:
https://www.youtube.com/watch?v=iuqi5I5wmuM

For agencies and developers:
https://www.youtube.com/watch?v=t5UO1XG8rQM

== Frequently Asked Questions ==

= Is Pet Nutrition Pro only a calorie calculator? =

No. The free workflow provides the pet profile, indicative calorie calculation and printable result. Diet Engine adds compatible WooCommerce product recommendations, feeding amounts and cart integration.

= Does the free calculator use an external service? =

Yes. Calorie calculation uses the Pet Nutrition Pro remote service and requires explicit administrator authorization.

= What is Diet Engine? =

Diet Engine is the optional paid remote service for compatible product matching, calculated daily feeding amounts and the advanced WooCommerce recommendation workflow.

= Does paying for Diet Engine unlock local PHP code? =

No. Pet Nutrition Pro is GPL-licensed. Payment is for remote Diet Engine access, not for unlocking locally installed PHP code.

= Can I control which products are recommended? =

Yes. Store owners configure participating products, compatibility criteria and merchant priority. Priority applies only to products that pass compatibility checks.

= Does Pet Nutrition Pro replace a veterinarian? =

No. It does not diagnose conditions, prescribe veterinary diets or replace professional veterinary advice.

== Screenshots ==

1. Dog and cat nutrition form.
2. Daily calorie requirement and printable summary.
3. WooCommerce product setup with kcal per 100 g and compatibility settings.
4. Compatible product recommendations generated with Diet Engine.
5. Merchant priority for Dry, Puffed and Wet groups.
6. Daily feeding amounts and WooCommerce cart integration.
7. Responsive Appearance and Layout controls.

== Changelog ==

= 1.3.1.7 =
* Completed the distinctive `bomapnp` namespace for WordPress options, transients, settings, menu slugs, asset handles, localized JavaScript globals, admin-post actions, nonce actions and public shortcodes.
* Product nutrition, compatibility and ordering data now use only canonical `bomapnp_*` WordPress post-meta keys at runtime; WooCommerce field IDs and remote API/SQL payload contracts remain unchanged.
* Product-list and ordering queries use simple canonical `bomapnp_*` meta keys, preserving ordering behavior without the temporary migration-bridge joins.
* Removed internal migration and rollback compatibility code used only to upgrade the project test environments before this WordPress.org candidate.

= 1.3.1.4 =
* Scoped one-shot product notices to WooCommerce product screens so they cannot appear on the WordPress Dashboard or unrelated admin pages.
* Narrowed the remote-service authorization notice to Pet Nutrition Pro admin screens and the individual product editor.
* No changes to stored data, nutrition calculations, Diet Engine, API/SQL behavior, products, ordering, shortcodes or translations.

= 1.3.1.3 =
* Removed dynamic calls to WordPress's low-level `translate()` API so all gettext source strings remain literal and Plugin Check compatible.
* Kept the validated runtime localization fallback for dynamic visible strings and the standard gettext fallback filter for WordPress language-pack compatibility.
* No changes to nutrition calculations, Diet Engine, API/SQL data, products, ordering, stored settings or public shortcodes.

= 1.3.1.2 =
* Removed bundled `.po`/`.mo` files from the plugin package in preparation for translate.wordpress.org distribution.
* Kept the validated multilingual continuity map as an application fallback, while standard WordPress gettext translations retain priority when available.
* No changes to stored data, Diet Engine, API/SQL behavior, nutrition calculations, products, ordering or public shortcodes.

= 1.3.1.1 =
* Fixed Portuguese (Brazil and Portugal) localization in the product-editor food-label profile guidance and terminology.
* No changes to stored data, nutrition calculations, Diet Engine, API/SQL behavior, products, ordering or public shortcodes.

= 1.3.1.0 =
* Adopted the distinctive WordPress.org slug and matching text domain `boma-pet-nutrition-pro`.
* Renamed the main plugin file and the temporary bundled gettext catalogs used during multilingual regression testing.
* Kept existing stored settings, product metadata, service data, nutrition calculations, Diet Engine, API/SQL payloads, products, ordering and public shortcodes unchanged.

= 1.3.0.6 =
* Renamed the remaining global PHP functions, globals and two custom cache hooks reported by Plugin Check to the unique `bomapnp` prefix.
* Removed the prohibited `suppress_filters => true` argument from the one-time legacy result-page lookup.
* Persistent option/meta/transient names, API/SQL payloads, translations, Diet Engine logic and nutrition calculations are intentionally unchanged.

= 1.3.0.5 =
* Makes legacy result-page shortcode migration robust across upgrades: configured page, `/resulting-diet/` page, or a single unambiguous legacy page are converted automatically to `[bomapnp_resulting_diet]`.
* Does not change additional prefixes, persistent product/settings data, translations, Diet Engine logic, API or SQL behavior.

= 1.3.0.4 =
* First controlled prefix cleanup: generic global declarations/constants and ordering AJAX action now use the unique `bomapnp` prefix.
* The generated result-page shortcode is now `[bomapnp_resulting_diet]`; configured legacy result pages are migrated non-destructively.
* Existing persistent option/meta names are intentionally unchanged in this step.


= 1.3.0.3 =
* Moved public form and result CSS/JavaScript to WordPress-enqueued assets.
* Moved print/PDF styling to a dedicated stylesheet and passed print configuration through WordPress localization data.
* Appearance and Layout dynamic result overrides now use wp_add_inline_style(); nutrition calculations, Diet Engine, stored data, slug, text domain, translations and notices remain unchanged.

= 1.3.0.2 =
* Moved administration CSS and JavaScript to WordPress-enqueued assets for the product editor, plugin admin pages, ordering screen, and Appearance and Layout screen.
* Dynamic admin strings, category data and nonces are now passed to the enqueued scripts through WordPress localization data.
* Frontend form/result assets, calculation logic, remote APIs, stored data, slug, text domain, translations and notices remain unchanged.

= 1.3.0.1 =
* First WordPress.org review adjustment release: display name changed to Boma Pet Nutrition Pro.
* Hardened license-host sanitization and hostname validation while preserving existing valid settings.
* Removed an undefined translation-loader call from the WooCommerce dependency check.

= 1.2.3.1 =
* Fixed the Media Library selector for the optional logo in Appearance and Layout.
* Improved public form compatibility with themes that override form-control colors or native select appearance.
* Declared compatibility with WooCommerce High-Performance Order Storage (HPOS).
* Synchronized bundled localization catalogs with the visible runtime translations.
* Public form structure, technical fields, nutrition calculations, Diet Engine calls and print/PDF workflow remain unchanged.

