Automattic / Automattic/jetpack

Content Options: Default 'false' for featured images on pages can affect WooCommerce shops

Open
#11,404 1 comment 0 reactions 0 assignees View on GitHub
[Feature] Theme Tools [Pri] Low [Status] Stale Bug
Dominant language
PHP
Stars
1.8k
Forks
898
Avg merge
1d 18h
Merged PRs (30d)
774

Description

There is a specific case where setting the Content Options > Featured Images > Display On Pages option to false by default, with `'page-default' => false`, can cause this control to affect WooCommerce shop pages as well. This is only happening in themes that do not include WooCommerce support.

#### Steps to reproduce the issue

1. Start with a theme that has featured images set to false by default under Content Options, and does not include WooCommerce support. (On WP.com, this is only Apostrophe 2, though you can recreate it by removing WC support from a theme that sets featured images to false on pages, like Button 2).
2. Install WooCommerce and set up a shop.
3. View one of the archive pages (like /shop).

#### What I expected

That the product featured images would display on the /shop page, and that a page setting wouldn't affect it.

#### What happened instead

No images appear.

However, if you go to the Customizer > Content Options and check 'Display on pages' under 'Featured Images', the images will work on the /shop page again.

**Screenshots**

With featured images off on pages (the first product has a featured image):

![image](https://user-images.githubusercontent.com/177561/53276230-1b811100-36b3-11e9-83de-89171dcf582f.png)

This originally came up as an issue for Apostrophe 2: https://github.com/Automattic/themes/issues/641
With featured images on on pages:

![image](https://user-images.githubusercontent.com/177561/53276248-394e7600-36b3-11e9-83d1-38efd2d11786.png)

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the issue through Content Options > Featured Images > Display On Pages with WooCommerce and a theme without WooCommerce support, then inspect the handling of the /shop archive. Done means product featured images display on WooCommerce shop pages regardless of the page default setting.

Written by the indexing model from the issue text.

Assessment

Tech stack
php, wordpress
Domain
frontend, web-dev
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.