Documentation
ShopFeed
Developer Reference

Developer Reference


Constants

ConstantDescription
SHOPFEED_VERSIONPlugin version
SHOPFEED_PLUGIN_FILEAbsolute path to the main plugin file
SHOPFEED_PLUGIN_DIRPlugin directory path
SHOPFEED_PLUGIN_URLPlugin URL
SHOPFEED_OPTION_KEYOption name storing all settings (shopfeed_settings)
SHOPFEED_LICENSE_OPTIONOption name storing the license key
SHOPFEED_LICENSE_STATUS_OPTIONOption name storing the license status
SHOPFEED_FEED_KEYSArray of channel keys: google, facebook, tiktok, pinterest, bing

Class Map

ClassFile
ShopFeed_Adminincludes/class-shopfeed-admin.php
ShopFeed_Cacheincludes/class-shopfeed-cache.php
ShopFeed_Cronincludes/class-shopfeed-cron.php
ShopFeed_Feed_Generatorincludes/class-shopfeed-feed-generator.php
ShopFeed_REST_APIincludes/class-shopfeed-rest-api.php
ShopFeed_Rules_Engineincludes/class-shopfeed-rules-engine.php
ShopFeed_Compat_SEOincludes/compat/class-shopfeed-compat-seo.php
ShopFeed_Compat_Subscriptionsincludes/compat/class-shopfeed-compat-subscriptions.php
ShopFeed_Compat_Languageincludes/compat/class-shopfeed-compat-language.php
ShopFeed_Compat_Currencyincludes/compat/class-shopfeed-compat-currency.php

REST Namespace

shopfeed/v1 - see REST API.


Cron Events

HookScheduleDescription
shopfeed_generate_{channel}_eventPer-channel frequency settingRegenerates the static feed for {channel} (google, facebook, tiktok, pinterest, or bing)

AJAX Actions

ActionDescription
shopfeed_save_settingsUnified settings save (all tabs)
shopfeed_reset_settingsReset settings to defaults
shopfeed_generate_nowForce-regenerate all static feeds immediately
shopfeed_preview_rulesPreview rule changes against a product sample, without saving
shopfeed_validate_feedRun the Feed Validator against a channel
shopfeed_license_actionActivate/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()):

KeyDefaultDescription
feeds.{channel}.enabledyesPer-channel toggle, for each of the 5 channels
feeds.{channel}.delivery_modestaticstatic or realtime
feeds.{channel}.update_frequencytwicedaily-
exclude_out_of_stockno-
included_categories[]Empty = all categories
default_brandSite name-
default_conditionnew-
currencyStore currency-
google_category''-
rules[]-
compat.seo_enabledno-
compat.subscriptions_enabledyes-
compat.multilingual_enabledno-
compat.active_languages[]Empty = all detected languages
compat.multicurrency_enabledno-
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.