HEX
Server: Apache/2.4.41 (Ubuntu)
System: Linux ip-172-31-42-149 5.15.0-1084-aws #91~20.04.1-Ubuntu SMP Fri May 2 07:00:04 UTC 2025 aarch64
User: ubuntu (1000)
PHP: 7.4.33
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
Upload Files
File: //proc/self/cwd/wp-content/plugins/extensive-vc-addon/plugins/woocommerce/woocommerce-functions.php
<?php

if ( ! defined( 'ABSPATH' ) ) {
	exit; // Exit if accessed directly
}

if ( ! function_exists( 'extensive_vc_woocommerce_installed' ) ) {
	/**
	 * Checks if WooCommerce plugin installed
	 *
	 * @return boolean
	 */
	function extensive_vc_woocommerce_installed() {
		return class_exists( 'WooCommerce' );
	}
}

if ( ! function_exists( 'extensive_vc_check_product_mark_visibility' ) ) {
	/**
	 * Checks if product mark exist for the current product
	 *
	 * @param $itemEnabled boolean - check item visibility throw shortcode option
	 *
	 * @return boolean
	 */
	function extensive_vc_check_product_mark_visibility( $itemEnabled = true ) {
		global $product;
		
		if ( method_exists( $product, 'is_on_sale' ) && $itemEnabled ) {
			return $product->is_on_sale();
		} else {
			return false;
		}
	}
}

if ( ! function_exists( 'extensive_vc_check_product_rating_visibility' ) ) {
	/**
	 * Checks if product rating exist for the current product
	 *
	 * @param $itemEnabled boolean - check item visibility throw shortcode option
	 *
	 * @return boolean
	 */
	function extensive_vc_check_product_rating_visibility( $itemEnabled = true ) {
		global $product;
		
		if ( method_exists( $product, 'get_average_rating' ) && $itemEnabled ) {
			return get_option( 'woocommerce_enable_review_rating' ) !== 'no' && $product->get_average_rating() > 0;
		} else {
			return false;
		}
	}
}

if ( ! function_exists( 'extensive_vc_check_product_price_visibility' ) ) {
	/**
	 * Checks if product price exist for the current product
	 *
	 * @param $itemEnabled boolean - check item visibility throw shortcode option
	 *
	 * @return boolean
	 */
	function extensive_vc_check_product_price_visibility( $itemEnabled = true ) {
		global $product;
		
		if ( method_exists( $product, 'get_price_html' ) && $itemEnabled ) {
			return $product->get_price_html() !== '';
		} else {
			return false;
		}
	}
}

if ( ! function_exists( 'extensive_vc_check_product_category_visibility' ) ) {
	/**
	 * Checks if product category exist for the current product
	 *
	 * @param $itemEnabled boolean - check item visibility throw shortcode option
	 *
	 * @return boolean
	 */
	function extensive_vc_check_product_category_visibility( $itemEnabled = true ) {
		global $product;
		
		return method_exists( $product, 'get_id' ) && $itemEnabled;
	}
}