ID ] ) ) { self::$types_by_action_id[ $action->ID ] = self::get_filtered_payment_method_types( $action ); } return self::$types_by_action_id[ $action->ID ]; } /** * @since 6.5, introduced in v3.1 of the Stripe add on. * * @param WP_Post $action * * @return string[] */ private static function get_filtered_payment_method_types( $action ) { /** * Allow users to filter payment method types to add possible other options like "us_bank_account". * An empty array is treated as automatic. * * @since 6.5, introduced in v3.1 of the Stripe add on. * * @param array $payment_method_types * @param array $args { * * @type WP_Post $action * } */ $payment_method_types = apply_filters( 'frm_stripe_payment_method_types', array(), array( 'action' => $action, 'form_id' => $action->menu_order, ) ); if ( ! is_array( $payment_method_types ) ) { _doing_it_wrong( __METHOD__, 'Payment method types should always be an array. All other values are invalid.', '3.1' ); // Fallback to automatic when an invalid value is used. $payment_method_types = array(); } return $payment_method_types; } }