• Resolved Ricardo Martins

    (@martins56)


    In the latest version of this plugin, you call a hook woocommerce_enqueue_stylesand make it call your method/function \Cartflows_Frontend::woo_default_css.

    Here you are supposed to add/merge your CSS to the current styles (received in the $woo_styles) parameter. However, you override them with your CSS, making any other CSS inserted before yours unusable, and breaking the checkout css in some cases.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Support Sravan Bhaskaravajjula

    (@bhshravankumar)

    Hello @martins56,

    I will forward this scenario to our developers. They will review and plan accordingly. Once they have reviewed this scenario, I will update you on the status.

    Thanks for sharing this scenario with us.

    Thread Starter Ricardo Martins

    (@martins56)

    Plugin Support Sravan Bhaskaravajjula

    (@bhshravankumar)

    Hello @martins56,

    Our developers have confirmed that “we are re-adding the WooCommerce styles using the WooCommerce’s script action.” Could you please provide more information about the CSS issue you mentioned? This additional context would help us understand the issue better and provide you with a more accurate response.

    Looking forward to hearing from you.

    Thread Starter Ricardo Martins

    (@martins56)

    @bhshravankumar

    A filter like yours should merge the existing css to your new css. Instead, you are removing the previously added css.

    Just have a look at this example from the official documentation and compare to yours below:

    public function woo_default_css( $woo_styles ) {
    //YOU REWRITE THE PREVIOUS $woo_styles IGNORING ANY CHANGES MADE BEFORE AND ADD ONLY YOUR OWN CSS
    $woo_styles = array(
    'woocommerce-layout' => array(
    'src' => plugins_url( 'assets/css/woocommerce-layout.css', WC_PLUGIN_FILE ),
    'deps' => '',
    'version' => WC_VERSION,
    'media' => 'all',
    'has_rtl' => true,
    ),
    'woocommerce-smallscreen' => array(
    'src' => plugins_url( 'assets/css/woocommerce-smallscreen.css', WC_PLUGIN_FILE ),
    'deps' => 'woocommerce-layout',
    'version' => WC_VERSION,
    'media' => 'only screen and (max-width: ' . apply_filters( 'woocommerce_style_smallscreen_breakpoint', '768px' ) . ')',
    'has_rtl' => true,
    ),
    'woocommerce-general' => array(
    'src' => plugins_url( 'assets/css/woocommerce.css', WC_PLUGIN_FILE ),
    'deps' => '',
    'version' => WC_VERSION,
    'media' => 'all',
    'has_rtl' => true,
    ),
    );

    return $woo_styles;
    }
    Plugin Support Sravan Bhaskaravajjula

    (@bhshravankumar)

    Hello @martins56,

    Thanks for providing more information, I have shared it with our developers, and they will review and plan accordingly.

    Best Regards,

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Bug on your filter’ is closed to new replies.