diff --git a/square/controllers/FrmSquareLiteActionsController.php b/square/controllers/FrmSquareLiteActionsController.php index 541360a277..4239f13d7f 100644 --- a/square/controllers/FrmSquareLiteActionsController.php +++ b/square/controllers/FrmSquareLiteActionsController.php @@ -567,7 +567,6 @@ private static function get_style( $form_id ) { 'backgroundColor' => $settings['bg_color'], 'fontWeight' => $settings['field_weight'], ), - // How does input placeholder work?? 'input::placeholder' => array( 'color' => $settings['text_color_disabled'], ), @@ -580,7 +579,7 @@ private static function get_style( $form_id ) { ); if ( ! empty( $settings['font'] ) ) { - $style['input']['fontFamily'] = $settings['font']; + $style['input']['fontFamily'] = self::prepare_font_family_setting( $settings['font'] ); } /** @@ -593,6 +592,23 @@ private static function get_style( $form_id ) { return apply_filters( 'frm_square_style', $style, $settings, $form_id ); } + /** + * Prepare the font family setting for the Stripe element. + * + * @since x.x + * + * @param string $font + * @return string + */ + private static function prepare_font_family_setting( $font ) { + if ( false === strpos( $font, ',' ) ) { + return $font; + } + + $fonts = explode( ',', $font ); + return trim( reset( $fonts ) ); + } + /** * Get the border radius for Stripe elements. *