• Resolved sanderrrrr

    (@sanderrrrr)


    Hello,

    it seems your css file is loaded on every single page, even when it’s only needed on checkout. Could you change this; or could you give me the style to deque?

    I am talking about: /plugins/mollie-payments-for-woocommerce/public/css/mollie-gateway-icons.min.css

    I would like to dequeue it as follows. Could you provide me with the correct style?

    add_action('wp_enqueue_scripts', 'disable_woocommerce_loading_css_js' );
    
    function disable_woocommerce_loading_css_js() {
    	if(! is_cart() && ! is_checkout() ) { 				
    		wp_dequeue_style('<strong>MOLLIE??</strong>'); 
    
    	}
    }
Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Support Syde Niklas

    (@niklasinpsyde)

    Hi @sanderrrrr,

    We will take care of this for the next plugin update.
    I requested some information about the style and will let you know when I heard back.

    Kind regards,
    Niklas

    Plugin Support Syde Niklas

    (@niklasinpsyde)

    Hi @sanderrrrr,

    Please take a look here:
    https://github.com/mollie/WooCommerce/blob/264007f9b73a9b4b50e6c73e91827566ee99a0d4/src/Mollie/WC/Plugin.php#L743
    We are registering the style: mollie-gateway-icons
    The same handle can be used to dequeue the style.
    But as mentioned above, this behavior will be resolved in our next plugin update.

    Kind regards,
    Niklas

    Thread Starter sanderrrrr

    (@sanderrrrr)

    Thank you for the quick reply.
    I will wait for the next update to see if it’s resolved.
    Keep up the great work (Y).

    Thread Starter sanderrrrr

    (@sanderrrrr)

    FYI: there seems to be another (but perhaps related) strange behavior.
    In source code:

    <script type='text/javascript' id='mollie_wc_admin_settings-js-extra'>
    /* <![CDATA[ */
    var mollieSettingsData = {"current_section":null};
    var mollieSettingsData = {"current_section":null};
    var mollieSettingsData = {"current_section":null};
    var mollieSettingsData = {"current_section":null};
    var mollieSettingsData = {"current_section":null};
    var mollieSettingsData = {"current_section":null};
    var mollieSettingsData = {"current_section":null};
    var mollieSettingsData = {"current_section":null};
    var mollieSettingsData = {"current_section":null};
    var mollieSettingsData = {"current_section":null};
    var mollieSettingsData = {"current_section":null};
    var mollieSettingsData = {"current_section":null};
    var mollieSettingsData = {"current_section":null};
    var mollieSettingsData = {"current_section":null};
    var mollieSettingsData = {"current_section":null};
    var mollieSettingsData = {"current_section":null};
    var mollieSettingsData = {"current_section":null};
    var mollieSettingsData = {"current_section":null};
    var mollieSettingsData = {"current_section":null};
    var mollieSettingsData = {"current_section":null};
    var mollieSettingsData = {"current_section":null};
    var mollieSettingsData = {"current_section":null};
    var mollieSettingsData = {"current_section":null};
    var mollieSettingsData = {"current_section":null};
    var mollieSettingsData = {"current_section":null};
    var mollieSettingsData = {"current_section":null};
    var mollieSettingsData = {"current_section":null};
    var mollieSettingsData = {"current_section":null};
    /* ]]> */
    • This reply was modified 3 years, 9 months ago by sanderrrrr.
Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Only load CSS on relevant page’ is closed to new replies.