HEX
Server: Apache
System: Linux webd003.cluster128.gra.hosting.ovh.net 6.18.42-ovh-vps-grsec-zfs+ #1 SMP PREEMPT_DYNAMIC Wed Aug 5 15:59:48 CEST 2026 x86_64
User: slyfwmm (169339)
PHP: 8.1.34
Disabled: _dyuweyrj4,_dyuweyrj4r,dl
Upload Files
File: /home/slyfwmm/cortonavolley/wp-content/themes/subway/woocommerce/woocommerce_configuration.php
<?php

//Disable the default WooCommerce stylesheet.
add_filter( 'woocommerce_enqueue_styles', '__return_false' );

if(!function_exists('subway_qode_woo_related_products_args')) {
    /**
     * Function that sets number of displayed related products. Hooks to woocommerce_output_related_products_args filter
     * @param $args array array of args for the query
     * @return mixed array of changed args
     */
    function subway_qode_woo_related_products_args($args ) {
        $args['posts_per_page'] = 4;
        return $args;
    }

    add_filter( 'woocommerce_output_related_products_args', 'subway_qode_woo_related_products_args' );
}

// Redefine woocommerce_output_upsell_products()
if(!function_exists('subway_qode_woo_upsell_products_args')) {
    function subway_qode_woo_upsell_products_args($args ) {
        $args['posts_per_page'] = 4;
        
        return $args;
    }
    
    add_filter( 'woocommerce_upsell_display_args', 'subway_qode_woo_upsell_products_args' );
}

// Display 12 products per page.
if ( ! function_exists('subway_qode_woocommerce_products_per_page') ) {
    /**
     * Function that sets number of products per page. Default is 9
     * @return int number of products to be shown per page
     */
    function subway_qode_woocommerce_products_per_page() {
        return 12;
    }

    add_filter('loop_shop_per_page', 'subway_qode_woocommerce_products_per_page', 20);
}


if ( ! function_exists('subway_qode_custom_override_checkout_fields') ) {
	/**
	 * Overrides placeholder values for checkout fields
	 * @param array all checkout fields
	 * @return array checkout fields with overriden values
	 */
	function subway_qode_custom_override_checkout_fields($fields) {
		//billing fields
		$args_billing = array(
			'first_name' => esc_html__('First name','subway'),
			'last_name'  => esc_html__('Last name','subway'),
			'company'    => esc_html__('Company name','subway'),
			'address_1'  => esc_html__('Address','subway'),
			'email'      => esc_html__('Email','subway'),
			'phone'      => esc_html__('Phone','subway'),
			'postcode'   => esc_html__('Postcode / ZIP','subway'),
			'city'   => esc_html__('City','subway'),
			'state'   => esc_html__('State','subway')
		);

		//shipping fields
		$args_shipping = array(
			'first_name' => esc_html__('First name','subway'),
			'last_name'  => esc_html__('Last name','subway'),
			'company'    => esc_html__('Company name','subway'),
			'address_1'  => esc_html__('Address','subway'),
			'postcode'   => esc_html__('Postcode / ZIP','subway'),
			'city'   => esc_html__('City','subway')
		);

		//override billing placeholder values
		foreach ($args_billing as $key => $value) {
			$fields["billing"]["billing_{$key}"]["placeholder"] = $value;
		}

		//override shipping placeholder values
		foreach ($args_shipping as $key => $value) {
			$fields["shipping"]["shipping_{$key}"]["placeholder"] = $value;
		}

		return $fields;
	}

	add_filter('woocommerce_checkout_fields', 'subway_qode_custom_override_checkout_fields');
}
// Adds theme support for woocommerce 
add_theme_support('woocommerce');

if (!function_exists('subway_qode_woocommerce_content')){

    /**
     * Output WooCommerce content.
     *
     * This function is only used in the optional 'woocommerce.php' template
     * which people can add to their themes to add basic woocommerce support
     * without hooks or modifying core templates.
     *
     * @access public
     * @return void
     */
    function subway_qode_woocommerce_content() {

        if ( is_singular( 'product' ) ) {

            while ( have_posts() ) : the_post();

                wc_get_template_part( 'content', 'single-product' );

            endwhile;

        } else {

            ?>

            <?php do_action( 'woocommerce_archive_description' ); ?>

            <?php if ( have_posts() ) : ?>

                <?php do_action('woocommerce_before_shop_loop'); ?>

                <?php woocommerce_product_loop_start(); ?>

                    <?php woocommerce_product_subcategories(); ?>

                    <?php while ( have_posts() ) : the_post(); ?>

                        <?php wc_get_template_part( 'content', 'product' ); ?>

                    <?php endwhile; // end of the loop. ?>

                <?php woocommerce_product_loop_end(); ?>

                <?php do_action('woocommerce_after_shop_loop'); ?>

            <?php elseif ( ! woocommerce_product_subcategories( array( 'before' => woocommerce_product_loop_start( false ), 'after' => woocommerce_product_loop_end( false ) ) ) ) : ?>

                <?php wc_get_template( 'loop/no-products-found.php' ); ?>

            <?php endif;

        }
    }
}
if ( ! function_exists('woocommerce_output_product_data_tabs') ) {

	/**
	 * Output the product tabs.
	 *
	 * @access public
	 * @subpackage	Product/Tabs
	 * @return void
	 */
	function woocommerce_output_product_data_tabs() {
		wc_get_template( 'single-product/tabs/tabs.php' );
                echo '</div>';
	}
}


if(!function_exists('subway_qode_woocommerce_change_actions_priorities')) {
    /**
     * Function that changes woocommerce actions priorities.
     * Used in product listing to put product rating bellow product price
     */
    function subway_qode_woocommerce_change_actions_priorities() {
        $actions = array(
            array(
                'tag' => 'woocommerce_after_shop_loop_item_title',
                'action' => 'woocommerce_template_loop_price',
                'priority' => 10,
                'priority_to_set' => 10
            ),
            array(
                'tag' => 'woocommerce_after_shop_loop_item_title',
                'action' => 'woocommerce_template_loop_rating',
                'priority' => 5,
                'priority_to_set' => 11
            )
        );
        
        foreach($actions as $action) {
            //actions which priorities needs to be changed
            remove_action($action['tag'], $action['action'], $action['priority']);
            
            //new priorities
            add_action($action['tag'], $action['action'], $action['priority_to_set']);
        }
    }
    
    add_action('woocommerce_change_priorities', 'subway_qode_woocommerce_change_actions_priorities');
    do_action('woocommerce_change_priorities');
}

/* Removes double links around photos on lists and related items */
remove_action('woocommerce_before_shop_loop_item', 'woocommerce_template_loop_product_link_open', 10);

//Override product title with our own html
remove_action( 'woocommerce_shop_loop_item_title', 'woocommerce_template_loop_product_title', 10 );



if ( ! function_exists('subway_qode_changed_woocommerce_template_loop_product_title') ) {
	function subway_qode_changed_woocommerce_template_loop_product_title() {
		the_title( '<h3>', '</h3>' );
	}

	add_action( 'woocommerce_shop_loop_item_title', 'subway_qode_changed_woocommerce_template_loop_product_title', 10 );
}

if ( ! function_exists( 'subway_qode_set_number_of_columns_woo_product_list' ) ) {
    function subway_qode_set_number_of_columns_woo_product_list() {
        global $woocommerce_loop;

        $woocommerce_loop['columns'] = 3;
    }
}