' . esc_html__( 'Settings', 'ag-data-for-posthog' ) . ''; array_unshift( $links, $settings_link ); return $links; } ); /** * Add row meta links on the Plugins page (Docs, Support, GitHub). */ add_filter( 'plugin_row_meta', function ( $links, $file ) { if ( plugin_basename( __FILE__ ) !== $file ) { return $links; } $links[] = '' . esc_html__( 'Documentation', 'ag-data-for-posthog' ) . ''; $links[] = '' . esc_html__( 'Support', 'ag-data-for-posthog' ) . ''; return $links; }, 10, 2 ); /** * Check for WooCommerce dependency and bootstrap the plugin. */ add_action( 'plugins_loaded', function () { if ( ! class_exists( 'WooCommerce' ) ) { add_action( 'admin_notices', function () { ?>
AG Data for PostHog requires WooCommerce to be installed and active.