Start a free 14-day trial by December 1 on a wide range of WooCommerce Marketplace extensions and themes. Explore products

Prevent customers from changing Photography collection visibility

Prevent customers from changing the visibility of their Photography collections using a filter.

Note:

This is a developer-level doc. If you are unfamiliar working with code and resolving potential conflicts, we recommend you work with a Woo Agency Partner for larger projects, or find a WooCommerce developer on Codeable for smaller customization work. We are unable to provide support for customization under our Support Policy.

Before you begin

↑ Back to top

Back up your site and test custom code on a staging site. Add the snippet using a site-specific plugin or another method that keeps customizations separate from your theme.

Disable customer visibility changes

↑ Back to top

Add the following PHP snippet:

add_filter( 'woocommerce_photography_customers_can_change_visibility', '__return_false' );

The filter applies to all customers and collections. Customers can still view collections they have access to; this filter controls whether they can change collection visibility.

To verify the change, sign in as a customer with an assigned collection and open their collections page. The visibility selector should no longer be available. Removing the snippet restores the default behavior, unless another customization changes the same permission.

Questions and support

↑ Back to top

Something missing from this documentation? Still have questions and need assistance?

  • If you have a question about a specific extension or theme you’d like to purchase, contact us to get answers.
  • If you already purchased this product and need some assistance, get in touch with a Happiness Engineer via our support page and select this product’s name from the Product dropdown.

Related Products

WooCommerce Subscriptions is a WooCommerce extension that lets customers subscribe to your products or...

Offer add-ons like gift wrapping, special messages or other special options for your products.

Use of your personal data
We and our partners process your personal data (such as browsing data, IP Addresses, cookie information, and other unique identifiers) based on your consent and/or our legitimate interest to optimize our website, marketing activities, and your user experience.