Developer Reference
Constants
| Constant | Description |
|---|---|
SHOPFEED_VERSION | Plugin version |
SHOPFEED_PLUGIN_FILE | Absolute path to the main plugin file |
SHOPFEED_PLUGIN_DIR | Plugin directory path |
SHOPFEED_PLUGIN_URL | Plugin URL |
SHOPFEED_OPTION_KEY | Option name storing all settings (shopfeed_settings) |
SHOPFEED_LICENSE_OPTION | Option name storing the license key |
SHOPFEED_LICENSE_STATUS_OPTION | Option name storing the license status |
SHOPFEED_FEED_KEYS | Array of channel keys: google, facebook, tiktok, pinterest, bing |
Class Map
| Class | File |
|---|---|
ShopFeed_Admin | includes/class-shopfeed-admin.php |
ShopFeed_Cache | includes/class-shopfeed-cache.php |
ShopFeed_Cron | includes/class-shopfeed-cron.php |
ShopFeed_Feed_Generator | includes/class-shopfeed-feed-generator.php |
ShopFeed_REST_API | includes/class-shopfeed-rest-api.php |
ShopFeed_Rules_Engine | includes/class-shopfeed-rules-engine.php |
ShopFeed_Compat_SEO | includes/compat/class-shopfeed-compat-seo.php |
ShopFeed_Compat_Subscriptions | includes/compat/class-shopfeed-compat-subscriptions.php |
ShopFeed_Compat_Language | includes/compat/class-shopfeed-compat-language.php |
ShopFeed_Compat_Currency | includes/compat/class-shopfeed-compat-currency.php |
REST Namespace
shopfeed/v1 - see REST API.
Cron Events
| Hook | Schedule | Description |
|---|---|---|
shopfeed_generate_{channel}_event | Per-channel frequency setting | Regenerates the static feed for {channel} (google, facebook, tiktok, pinterest, or bing) |
AJAX Actions
| Action | Description |
|---|---|
shopfeed_save_settings | Unified settings save (all tabs) |
shopfeed_reset_settings | Reset settings to defaults |
shopfeed_generate_now | Force-regenerate all static feeds immediately |
shopfeed_preview_rules | Preview rule changes against a product sample, without saving |
shopfeed_validate_feed | Run the Feed Validator against a channel |
shopfeed_license_action | Activate/deactivate the license key |
Rules Engine Reference
ShopFeed_Rules_Engine constants used to build and validate rules:
CONDITION_FIELDS - title, description, sku, brand, product_type, regular_price, price_numeric, stock_quantity, availability
OPERATORS - equals, not_equals, contains, not_contains, starts_with, ends_with, greater_than, less_than, is_empty, is_not_empty
ACTIONS - exclude, set_title, prepend_title, append_title, find_replace_title, set_description, find_replace_description, set_brand, set_google_category, set_availability, add_custom_label, set_price, adjust_price_percent, adjust_price_fixed
See Rules Engine for the user-facing description of each.
Default Settings
Stored in the shopfeed_settings option (shopfeed_default_settings()):
| Key | Default | Description |
|---|---|---|
feeds.{channel}.enabled | yes | Per-channel toggle, for each of the 5 channels |
feeds.{channel}.delivery_mode | static | static or realtime |
feeds.{channel}.update_frequency | twicedaily | - |
exclude_out_of_stock | no | - |
included_categories | [] | Empty = all categories |
default_brand | Site name | - |
default_condition | new | - |
currency | Store currency | - |
google_category | '' | - |
rules | [] | - |
compat.seo_enabled | no | - |
compat.subscriptions_enabled | yes | - |
compat.multilingual_enabled | no | - |
compat.active_languages | [] | Empty = all detected languages |
compat.multicurrency_enabled | no | - |
compat.active_currencies | [] | Empty = all detected currencies |
Compatibility toggles/lists are only ever written by the settings save handler when their underlying integration is detected as active - saving from another tab never overwrites a compatibility value while its plugin is inactive.