• Resolved hotcookie

    (@hotcookie)


    I’m developing a plugin for deliveries. The page is located under woocommerce admin. I’m using form-row, form-row-wide, etc from the woocommerce admin.css file. It was working. I migrated the database from the active site. Seems after that wordpress is no longer loading the woocommerce plugin admin.css. Befuddled on what happened. Thoughts.

    I’m on the currrent version of wordpress and woocommerce.

    The page I need help with: [log in to see the link]

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Support Kaushik S. a11n

    (@kaushiksomaiya)

    Hi there!

    Thank you for contacting us.

    I understand for the custom plugin you are developing, WooCommerce admin.css file is not getting loaded.

    I am not too sure about this, but you can try loading the CSS manually on your custom admin page:

    wp_enqueue_style( 'woocommerce_admin_styles', WC()->plugin_url() . '/assets/css/admin.css');

    I can also recommend the WooCommerce Developer Resources Portal for resources on developing for WooCommerce.

    You can also visit the WooCommerce Facebook group or the #developers channel of the WooCommerce Community Slack. We’re lucky to have a great community of open-source developers for WooCommerce, and many of our developers hang out there, as well.

    Thread Starter hotcookie

    (@hotcookie)

    Thanks for responding. Forcing it to load in the php file works.

    The question is why its not being loaded automatically? It was being loaded automatically and suddenly stopped. What caused it to stop being loaded? Is there any reason admin.css wouldn’t be loaded on a page under
    “wp-admin/admin.php?page=deliveries”?

    Mirko P.

    (@rainfallnixfig)

    Forcing it to load in the php file works.

    Glad to hear it. Thanks for letting us know.

    What caused it to stop being loaded?

    The answer to this seems to be in your first message and I’m quoting it here:

    It was working. I migrated the database from the active site. Seems after that wordpress is no longer loading the woocommerce plugin admin.css

    The channels for developers recommended above by Kaushik might be the best place to get more insights on this issue you’re facing.

    Thanks.

    Thread Starter hotcookie

    (@hotcookie)

    Discovered further details on what was causing.

    I was adding new code. That caused PHP to find syntax errors and stop processing. For some reason php retained some state information after halting because of the syntax errors that caused it to not load the css on subsequent retries.

    When I restarted php on my mac, the problem went away. When I restarted php on the forge server, the problem also went away.

    I’m not a expert on the php parser. Seems like an interaction problem with wordpresses implementation of loading css and the parser.

    Hi @hotcookie

    Thank you for sharing this!

    I’m not a expert on the php parser. Seems like an interaction problem with wordpresses implementation of loading css and the parser.

    I’d try asking this on the developer’s channel of the WooCommerce Community Slack. You’ll have a better chance of finding open source developers who can clarify this.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘woocommerce admin.css not loading’ is closed to new replies.