Inicio - Documentación - POM Theme - 11 Developers - Check compatible integrations

Check compatible integrations

POM provides semantic checks for integrations used by the theme:

  • pom_is_woocommerce_active()
  • pom_is_amp_active()
  • pom_is_woocommerce_product_addons_active()
  • pom_is_tweaks_active()
  • pom_is_visual_composer_active()
  • pom_is_rankmath_active()
  • pom_is_polylang_pro_active()
  • pom_is_pom_translate_active()
  • pom_is_subscriptions_plugin_active()
  • pom_is_bookings_active()
  • pom_is_bookings_accommodation_active()
  • pom_is_affiliate_wp_active()
  • pom_is_pom_cache_active()

Example:

if ( function_exists( 'pom_is_woocommerce_active' ) && pom_is_woocommerce_active() ) {
    // Register the WooCommerce-facing integration.
}

These helpers express the compatibility condition POM itself uses and are preferable to duplicating plugin basenames. Still check for the precise class/function before calling an optional third-party API: “plugin active” does not guarantee a particular version supplies every method.

Register hooks conditionally, but do not perform an expensive active-plugin check on every item in a loop. Never activate an integration automatically merely because its files are installed.