# shopbuilder/3.4.1/app/Controllers/PluginsSupport/AddifyVisibilityByRoles.php

ShopBuilder – WooCommerce Builder For Elementor, version 3.4.1. 49 lines.

- Page: https://pluginprobe.com/plugins/shopbuilder/3.4.1/code/app/Controllers/PluginsSupport/AddifyVisibilityByRoles.php
- Raw: https://pluginprobe.com/plugins/shopbuilder/3.4.1/raw/app/Controllers/PluginsSupport/AddifyVisibilityByRoles.php
- Modified: 2026-08-10T09:20:54+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/shopbuilder/3.4.1/code/app/Controllers/PluginsSupport/AddifyVisibilityByRoles.php#L10-L20`.

```php
<?php
/**
 * Products Visibility By User Roles plugin support.
 *
 * @package RadiusTheme\SB
 */

namespace RadiusTheme\SB\Controllers\PluginsSupport;

use RadiusTheme\SB\Traits\SingletonTrait;

// Do not allow directly accessing this file.
if ( ! defined( 'ABSPATH' ) ) {
	exit( 'This script cannot be accessed directly.' );
}

/**
 * WooCommerce address book plugin support
 */
class AddifyVisibilityByRoles {
	/**
	 * SingletonTrait.
	 */
	use SingletonTrait;

	/**
	 * Construct function
	 */
	private function __construct() {
		if ( ! class_exists( 'Addify_Products_Visibility_Front' ) ) {
			return;
		}

		add_action( 'rtsb/elements/render/product_query', [ $this, 'modify_query' ], 99 );
	}

	/**
	 * Modify product query.
	 *
	 * @param object $product_query Product Query.
	 *
	 * @return void
	 */
	public function modify_query( $product_query ) {
		$custom_visibility = new \Addify_Products_Visibility_Front();
		$custom_visibility->afpvu_custom_pre_get_posts_query( $product_query );
	}
}

```
