You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have carried out troubleshooting steps and I believe I have found a bug.
I have searched for similar bugs in both open and closed issues and cannot find a duplicate.
Describe the bug
Some buttons in WooCommerce are using the wrong WooCommerce purple (pinkish) color. See examples below.
Coupons page:
"Update WooCommerce database" button:
Orders page:
Products page:
Expected behavior
Desired behavior: The buttons should be using WordPress theme's primary button color. This would also make it consistent with the use of @wordpress/component's Button component in WooCommerce Admin.
Alternative behavior: The buttons should be using the correct WooCommerce purple button color.
Actual behavior
The buttons are using the wrong WooCommerce purple (pinkish) color.
Steps to reproduce
Setup a new site and go to Marketing > Coupons page: /wp-admin/edit.php?post_type=shop_coupon.
One way to fix this is to remove the above CSS code and remove the usage of the CSS class. It seems like by doing that, the buttons would then be using WP primary color based on admin color scheme.
Screenshot below shows that CSS is disabled in dev tools and the button uses WP default primary color:
To change the WP Admin color scheme, go to Users > Profile page: /wp-admin/profile.php.
Screenshot below shows that CSS is disabled in dev tools and the site is using "Sunrise" admin color scheme:
WordPress Environment
N/A
Isolating the problem
I have deactivated other plugins and confirmed this bug occurs when only WooCommerce plugin is active.
This bug happens with a default WordPress theme active, or Storefront.
I can reproduce this bug consistently using the steps above.
The text was updated successfully, but these errors were encountered:
Prerequisites
Describe the bug
Some buttons in WooCommerce are using the wrong WooCommerce purple (pinkish) color. See examples below.
Coupons page:
"Update WooCommerce database" button:
Orders page:
Products page:
Expected behavior
Desired behavior: The buttons should be using WordPress theme's primary button color. This would also make it consistent with the use of
@wordpress/component
's Button component in WooCommerce Admin.Alternative behavior: The buttons should be using the correct WooCommerce purple button color.
Actual behavior
The buttons are using the wrong WooCommerce purple (pinkish) color.
Steps to reproduce
/wp-admin/edit.php?post_type=shop_coupon
.Additional info
Possible solution
I looked into the code and the button color comes from the following CSS:
woocommerce/plugins/woocommerce/client/legacy/css/admin.scss
Lines 901 to 922 in 4cbb607
One way to fix this is to remove the above CSS code and remove the usage of the CSS class. It seems like by doing that, the buttons would then be using WP primary color based on admin color scheme.
Screenshot below shows that CSS is disabled in dev tools and the button uses WP default primary color:
To change the WP Admin color scheme, go to Users > Profile page:
/wp-admin/profile.php
.Screenshot below shows that CSS is disabled in dev tools and the site is using "Sunrise" admin color scheme:
WordPress Environment
N/A
Isolating the problem
The text was updated successfully, but these errors were encountered: