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 topBack 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 topAdd 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 topSomething 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.