register( new AgentaOS_Blocks() ); } ); } ); // Docs and Support next to the plugin's description on the Plugins screen. add_filter( 'plugin_row_meta', static function ( $links, $file ) { if ( plugin_basename( __FILE__ ) === $file ) { $links[] = '' . esc_html__( 'Docs', 'agentaos-payments' ) . ''; $links[] = '' . esc_html__( 'Support', 'agentaos-payments' ) . ''; } return $links; }, 10, 2 ); // Until the keys are in, remind the merchant on the Plugins screen. add_action( 'admin_notices', static function () { $screen = function_exists( 'get_current_screen' ) ? get_current_screen() : null; if ( ! $screen || 'plugins' !== $screen->id || ! current_user_can( 'manage_woocommerce' ) || ! class_exists( 'AgentaOS_Gateway' ) ) { return; } $settings = get_option( 'woocommerce_agentaos_settings', array() ); $mode = isset( $settings['mode'] ) && 'live' === $settings['mode'] ? 'live' : 'test'; if ( ! empty( $settings[ $mode . '_api_key' ] ) && ! empty( $settings[ $mode . '_webhook_secret' ] ) ) { return; } $url = admin_url( 'admin.php?page=wc-settings&tab=checkout§ion=agentaos' ); printf( '
%1$s %2$s %4$s