pe' => self::PLUGIN_TYPE_WPORG, 'slug' => 'helio', ), 'links' => array( array( '_type' => self::LINK_TYPE_PRICING, 'url' => 'https://www.hel.io/pricing', ), array( '_type' => self::LINK_TYPE_ABOUT, 'url' => 'https://woocommerce.com/products/helio-pay/', ), array( '_type' => self::LINK_TYPE_TERMS, 'url' => 'https://info.docs.hel.io/terms-of-service', ), array( '_type' => self::LINK_TYPE_DOCS, 'url' => 'https://woocommerce.com/document/helio-pay/', ), array( '_type' => self::LINK_TYPE_SUPPORT, 'url' => 'https://woocommerce.com/my-account/contact-support/?select=helio-pay', ), ), ), self::MONEI => array( '_type' => self::TYPE_PSP, 'title' => esc_html__( 'MONEI', 'woocommerce' ), 'description' => esc_html__( 'Accept Cards, Apple Pay, Google Pay, Bizum, PayPal, and many more payment methods in your store.', 'woocommerce' ), 'icon' => plugins_url( 'assets/images/onboarding/icons/monei.svg', WC_PLUGIN_FILE ), 'plugin' => array( '_type' => self::PLUGIN_TYPE_WPORG, 'slug' => 'monei', ), 'links' => array( array( '_type' => self::LINK_TYPE_PRICING, 'url' => 'https://monei.com/pricing/', ), array( '_type' => self::LINK_TYPE_ABOUT, 'url' => 'https://monei.com/', ), array( '_type' => self::LINK_TYPE_TERMS, 'url' => 'https://monei.com/legal-notice/', ), array( '_type' => self::LINK_TYPE_DOCS, 'url' => 'https://support.monei.com/hc/en-us/articles/360017801677-Get-started-with-MONEI', ), array( '_type' => self::LINK_TYPE_SUPPORT, 'url' => 'https://support.monei.com/hc/en-us/requests/new', ), ), ), self::COINBASE => array( '_type' => self::TYPE_CRYPTO, 'icon' => plugins_url( 'assets/images/onboarding/icons/coinbase.svg', WC_PLUGIN_FILE ), 'plugin' => array( '_type' => self::PLUGIN_TYPE_WPORG, 'slug' => 'coinbase-commerce', ), ), self::AUTHORIZE_NET => array( '_type' => self::TYPE_PSP, 'icon' => plugins_url( 'assets/images/onboarding/icons/authorize.svg', WC_PLUGIN_FILE ), 'plugin' => array( '_type' => self::PLUGIN_TYPE_WPORG, 'slug' => 'woocommerce-gateway-authorize-net-cim', ), ), self::BILLIE => array( '_type' => self::TYPE_PSP, 'title' => esc_html__( 'Billie', 'woocommerce' ), 'description' => esc_html__( 'Billie is the leading provider of Buy Now, Pay Later payment methods for B2B stores.', 'woocommerce' ), 'icon' => plugins_url( 'assets/images/onboarding/icons/billie.svg', WC_PLUGIN_FILE ), 'plugin' => array( '_type' => self::PLUGIN_TYPE_WPORG, 'slug' => 'billie-for-woocommerce', ), ), self::BOLT => array( '_type' => self::TYPE_PSP, 'icon' => plugins_url( 'assets/images/onboarding/icons/bolt.svg', WC_PLUGIN_FILE ), 'plugin' => array( '_type' => self::PLUGIN_TYPE_WPORG, 'slug' => 'bolt-checkout-woocommerce', ), ), self::DEPAY => array( '_type' => self::TYPE_PSP, 'icon' => plugins_url( 'assets/images/onboarding/icons/depay.svg', WC_PLUGIN_FILE ), 'plugin' => array( '_type' => self::PLUGIN_TYPE_WPORG, 'slug' => 'depay-payments-for-woocommerce', ), ), self::ELAVON => array( '_type' => self::TYPE_PSP, 'icon' => plugins_url( 'assets/images/onboarding/icons/elavon.svg', WC_PLUGIN_FILE ), 'plugin' => array( '_type' => self::PLUGIN_TYPE_WPORG, 'slug' => 'woocommerce-gateway-converge', ), ), self::EWAY => array( '_type' => self::TYPE_PSP, 'icon' => plugins_url( 'assets/images/onboarding/icons/eway.svg', WC_PLUGIN_FILE ), 'plugin' => array( '_type' => self::PLUGIN_TYPE_WPORG, 'slug' => 'woocommerce-gateway-eway', ), ), self::FORTISPAY => array( '_type' => self::TYPE_PSP, 'icon' => plugins_url( 'assets/images/onboarding/icons/fortispay.svg', WC_PLUGIN_FILE ), 'plugin' => array( '_type' => self::PLUGIN_TYPE_WPORG, 'slug' => 'fortis-for-woocommerce', ), ), self::GOCARDLESS => array( '_type' => self::TYPE_PSP, 'title' => esc_html__( 'GoCardless', 'woocommerce' ), 'description' => esc_html__( 'Accept Direct Debit, ACH Pull, and open baking payments.', 'woocommerce' ), 'icon' => plugins_url( 'assets/images/onboarding/icons/gocardless.svg', WC_PLUGIN_FILE ), 'plugin' => array( '_type' => self::PLUGIN_TYPE_WPORG, 'slug' => 'woocommerce-gateway-gocardless', ), 'links' => array( array( '_type' => self::LINK_TYPE_PRICING, 'url' => 'https://gocardless.com/pricing/', ), array( '_type' => self::LINK_TYPE_ABOUT, 'url' => 'https://woocommerce.com/products/gocardless/', ), array( '_type' => self::LINK_TYPE_TERMS, 'url' => 'https://gocardless.com/legal/', ), array( '_type' => self::LINK_TYPE_DOCS, 'url' => 'https://woocommerce.com/document/gocardless/', ), array( '_type' => self::LINK_TYPE_SUPPORT, 'url' => 'https://woocommerce.com/my-account/contact-support/?select=gocardless', ), ), ), self::NEXI => array( '_type' => self::TYPE_PSP, 'icon' => plugins_url( 'assets/images/onboarding/icons/nexi.svg', WC_PLUGIN_FILE ), 'plugin' => array( '_type' => self::PLUGIN_TYPE_WPORG, 'slug' => 'dibs-easy-for-woocommerce', ), ), self::PAYPAL_ZETTLE => array( '_type' => self::TYPE_PSP, 'icon' => plugins_url( 'assets/images/onboarding/icons/paypal-zettle.svg', WC_PLUGIN_FILE ), 'plugin' => array( '_type' => self::PLUGIN_TYPE_WPORG, 'slug' => 'zettle-pos-integration', ), ), self::RAPYD => array( '_type' => self::TYPE_PSP, 'icon' => plugins_url( 'assets/images/onboarding/icons/rapyd.svg', WC_PLUGIN_FILE ), 'plugin' => array( '_type' => self::PLUGIN_TYPE_WPORG, 'slug' => 'rapyd-payments-plugin-for-woocommerce', ), ), self::PAYPAL_BRAINTREE => array( '_type' => self::TYPE_PSP, 'icon' => plugins_url( 'assets/images/onboarding/icons/paypal-braintree.svg', WC_PLUGIN_FILE ), 'plugin' => array( '_type' => self::PLUGIN_TYPE_WPORG, 'slug' => 'woocommerce-gateway-paypal-powered-by-braintree', ), ), ); } /** * Get the base details for a specific extension. * * @see self::standardize_extension_details() for the supported entries. * * @param string $extension_id The extension ID. * * @return ?array The extension base details. * Null if the extension is not one we have details for. */ private function get_extension_base_details( string $extension_id ): ?array { $extensions = $this->get_all_extensions_base_details(); if ( ! isset( $extensions[ $extension_id ] ) ) { return null; } return $extensions[ $extension_id ]; } /** * Standardize the details for an extension. * * Ensures that the details array has all the required fields, and fills in any missing optional fields with defaults. * We also enforce a consistent order for the fields. * * @param array $extension_details The extension details. * * @return array The standardized extension details. */ private function standardize_extension_details( array $extension_details ): array { $standardized = array(); // Required fields. $standardized['id'] = $extension_details['id']; $standardized['_priority'] = $extension_details['_priority']; $standardized['_type'] = $extension_details['_type']; $standardized['plugin'] = $extension_details['plugin']; // Optional fields. $standardized['title'] = $extension_details['title'] ?? ''; $standardized['description'] = $extension_details['description'] ?? ''; $standardized['image'] = $extension_details['image'] ?? ''; $standardized['icon'] = $extension_details['icon'] ?? ''; $standardized['links'] = $extension_details['links'] ?? array(); $standardized['tags'] = $extension_details['tags'] ?? array(); $standardized['_incentive'] = $extension_details['_incentive'] ?? null; return $standardized; } }