=' ) ) { return; } BD_PCOD_Helpers::migrate_legacy_method_keys(); update_option( 'bd_pcod_db_version', BD_PCOD_VERSION ); } /** * Register the gateway class with WooCommerce. * * @param array $gateways Registered gateways. * @return array */ function bd_pcod_register_gateway( $gateways ) { if ( BD_PCOD_Helpers::is_gateway_visible( BD_PCOD_GATEWAY_ID ) ) { $gateways[] = 'BD_PCOD_Gateway'; } if ( BD_PCOD_Helpers::is_gateway_visible( BD_PCOD_FULL_GATEWAY_ID ) ) { $gateways[] = 'BD_PCOD_Full_Gateway'; } if ( BD_PCOD_Helpers::is_gateway_visible( BD_PCOD_BANK_GATEWAY_ID ) ) { $gateways[] = 'BD_PCOD_Bank_Gateway'; } return $gateways; } /** * Enqueue the front-end CSS on the order-received page (for the status block). * * The standalone gateway page loads its own CSS/JS directly in its template. */ function bd_pcod_enqueue_frontend_assets() { if ( ! function_exists( 'is_order_received_page' ) || ! is_order_received_page() ) { return; } wp_enqueue_style( 'bd-pcod-frontend', BD_PCOD_URL . 'assets/css/frontend.css', array(), BD_PCOD_VERSION ); } /** * Admin notice when WooCommerce is not active. */ function bd_pcod_missing_wc_notice() { echo '
'; echo esc_html__( 'AAM Partial COD Gateway requires WooCommerce to be installed and active.', 'aam-partial-cod' ); echo '