WordPress.org

Ready to get started?Download WordPress

Forums

WooCommerce - excelling eCommerce
Woocommerce Theme - Mystile Bug (2 posts)

  1. NicholasPerkins
    Member
    Posted 1 year ago #

    Hi guys,

    Just letting you know of a small issue with the Woo Custom Font code in includes/theme-actions.php line 229

    $output .= '.entry, .entry p { '.woo_generate_font_css($woo_options[ 'woo_font_post_entry' ], '1.5').' }
    h1, h2, h3, h4, h5, h6 { font-family: '.stripslashes($woo_options[ 'woo_font_post_entry' ]['face']).', arial, sans-serif; }'  . "\n";

    Any of the fonts with a space in the name won't work since it doesn't get wrapped in quotes.

    (Just wanted to let you know - not a paid up member so couldn't get in touch via your site)

    ETA: If anyone is after a quick fix, you can replace it with the following:

    $output .= '.entry, .entry p { '.woo_generate_font_css($woo_options[ 'woo_font_post_entry' ], '1.5').' }
    h1, h2, h3, h4, h5, h6 { font-family: \''.stripslashes($woo_options[ 'woo_font_post_entry' ]['face']).'\', arial, sans-serif; }'  . "\n";

    But there would be nicer ways to fix it more permanently (custom function or some such).

    http://wordpress.org/extend/plugins/woocommerce/

  2. NicholasPerkins
    Member
    Posted 12 months ago #

    Second associated issue in line 1824 of functions/admin-functions.php

    if ( $option['face'] == $font['name'] AND !strstr($fonts, $font['name']) ) {

    needs to be
    if ( $option['face'] == $font['name'] AND !strstr($fonts, $font['name']) . "|" ) {

    Because "PT Sans" matches "PT Sans Narrow", so including the bar in the search ensures an exact match.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags