Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hide Featured Product Images that Have Been Removed from FS Product #14

Open
rijarobinson opened this issue May 23, 2018 · 0 comments
Open

Comments

@rijarobinson
Copy link
Contributor

rijarobinson commented May 23, 2018

The featured image for a given product appears to be first pulling from the WordPress posts "featured image" option, before falling back to the FoxyShop "Product Images" option. The "featured image" option is hidden by default within the FoxyShop product pages in the admin though, so it can lead to a confusing situation where an image is linked to a product with no clear way to see or remove it.

The plugin hides that featured image section with some custom CSS - but if the checkbox is checked within screen options, it's displayed at that point because of an inline style on the element which overwrites the plugins custom style. After saving or refreshing the page, the featured images section won't be visible (as tested), even though it's still checked in the screen options.

This style in FS just needs to be made !important to fix:

body.post-type-foxyshop_product #postimagediv {
    display: none;
}

We may want to look into if there may be a specific reason why the featured image is still pulled in within the helper function for building out the gallery too.

Steps to reproduce

  • Click "screen options" up the top right of the product edit screen and check the box for featured image. It adds an extra panel to the sidebar which is separate to the FS images.
  • Add a product image through the featured image section and save. It will now display as the primary image on the product page - but as the "featured image" panel is now hidden in the admin, there isn't any way to remove it.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant