HEX
Server: LiteSpeed
System:
User: ()
PHP: 7.3.33
Disabled: ln,cat,popen,pclose,posix_getpwuid,posix_getgrgid,posix_kill,parse_perms,system,dl,passthru,exec,shell_exec,popen,proc_close,proc_get_status,proc_nice,proc_open,escapeshellcmd,escapeshellarg,show_source,posix_mkfifo,mysql_list_dbs,get_current_user,getmyuid,pconnect,link,symlink,pcntl_exec,ini_alter,pfsockopen,leak,apache_child_terminate,posix_setpgid,posix_setsid,posix_setuid,proc_terminate,syslog,stream_select,socket_select,socket_create,socket_create_listen,socket_create_pair,socket_listen,socket_accept,socket_bind,socket_strerror,pcntl_fork,pcntl_signal,pcntl_waitpid,pcntl_wexitstatus,pcntl_wifexited,pcntl_wifsignaled,pcntl_wifstopped,pcntl_wstopsig,pcntl_wtermsig,openlog,apache_get_modules,apache_get_version,apache_getenv,apache_note,apache_setenv,virtual,ini_get_all,php_passthru,posix_uname,php_uname,highlight_file,define_syslog_variables,ftp_exec,inject_code,eval
Upload Files
File: /var/www/vhosts/miroglu.net/httpdocs/wp-content/themes/the-landscaper/inc/woocommerce.php
<?php
/**
 * WooCommerce Integration
 *
 * @package the-landscaper-wp
 */

/**
 * Remove the default WooCommerce wrappers
 */
remove_action( 'woocommerce_before_main_content', 'woocommerce_output_content_wrapper', 10 );
remove_action( 'woocommerce_after_main_content', 'woocommerce_output_content_wrapper_end', 10 );

/**
 * Adding custom wrappers
 */
add_action( 'woocommerce_before_main_content', 'thelandscaper_wrapper_start', 10 );
add_action( 'woocommerce_after_main_content', 'thelandscaper_wrapper_end', 10 );

function thelandscaper_wrapper_start() {
	$sidebar = thelandscaper_single_product_sidebar();
	get_template_part( 'parts/main-title' );
	?>
	
	<div class="content">
		<div class="container">
			<div class="row">
				<main class="col-xs-12<?php echo ( is_active_sidebar( 'shop-sidebar' ) && 'Left' === $sidebar ) ? ' col-md-9 col-md-push-3' : ''; echo ( is_active_sidebar( 'shop-sidebar' ) && 'Right' === $sidebar ) ? ' col-md-9' : '';?>">
	<?php
}

function thelandscaper_wrapper_end() {
	$sidebar = thelandscaper_single_product_sidebar(); 
	?>
				</main>
	
				<?php if ( 'Hide' !== $sidebar && is_active_sidebar( 'shop-sidebar' ) ) : ?>
					<div class="col-xs-12 col-md-3<?php echo 'Left' === $sidebar ? ' col-md-pull-9' : ''; ?>">
						<aside class="sidebar">
							<?php dynamic_sidebar( 'shop-sidebar' ); ?>
						</aside>
					</div>
				<?php endif ?>

			</div>
		</div>
	</div>
<?php
}

/**
 * Show the page title in the main title area
 */
add_filter( 'woocommerce_show_page_title', '__return_false' );

/**
 * Set our own sidebar option
 */
remove_action( 'woocommerce_sidebar', 'woocommerce_get_sidebar', 10 ); 

/**
 * Use own breadcrumbs
 */
remove_action( 'woocommerce_before_main_content', 'woocommerce_breadcrumb', 20 );

/**
 * Change number or products per row to 4
 */
if ( ! function_exists( 'thelandscaper_loop_columns' ) ) {
	function thelandscaper_loop_columns() {
		return 4;
	}
	add_filter( 'loop_shop_columns', 'thelandscaper_loop_columns' );
}

/**
 * Display number of products per page from the theme customizer
 */
function thelandscaper_products_per_page() {
	return get_theme_mod( 'qt_shop_products_per_page', 8 );
}
add_filter( 'loop_shop_per_page', 'thelandscaper_products_per_page', 20 );

/**
 * The position of the sidebar for single product and shop base
 */
function thelandscaper_single_product_sidebar() {

	// Get the sidebar option field for the WooCommerce page
	$shop_sidebar = get_field( 'display_sidebar', (int) get_option( 'woocommerce_shop_page_id' ) );

	// For single product pages get the sidebar position customizer setting
	if ( is_product() || is_product_category() ) {
		$shop_sidebar = get_theme_mod( 'qt_single_product_sidebar', 'Right' );
	}

	// If sidebar isn't set hide the sidebar
	if ( ! $shop_sidebar ) { 
		$shop_sidebar = 'Hide';
	}

	// Return the sidebar
	return $shop_sidebar;
}

/**
 * Set the amount of related products shown at the bottom on product pages
 */
function thelandscaper_related_products( $args ) {
	$args['posts_per_page'] = 4;
	$args['columns'] = 4;

	return $args;
}
add_filter( 'woocommerce_output_related_products_args', 'thelandscaper_related_products' );