File: //proc/1526/cwd/shoetique/wp-content/plugins/Shoetique-Borealis/index.php
<?php
include_once('ajax.php');
/*
Plugin Name: Site plugin for Shotique
Descrpition: Site specific code changes for shoetique
*/
function payment_gateway_disable_country( $available_gateways ) {
$customer = new WC_Customer(get_current_user_id());
$customer_country = $customer->get_billing_country();
if ( isset( $available_gateways['cod'] ) && $customer_country <> 'HR' &&
$customer_country <> 'SI' ) {
unset( $available_gateways['cod'] );
}
return $available_gateways;
}
add_action('admin_head', 'my_custom_fonts');
function my_custom_fonts() {
echo '<style>
.table-bordered tr.variation-line{
display: table-row!important;
}
</style>';
}
//add_filter( 'woocommerce_available_payment_gateways', 'payment_gateway_disable_country' );
function custom_code_init(){
add_image_size('product-image',900,720, true);
add_image_size('product-image-thumb',450,360, true);
}
function go_to_cart() {
global $woocommerce;
if ( sizeof( $woocommerce->cart->get_cart() ) > 0 ){
echo '<a href="'. $woocommerce->cart->get_checkout_url() . '" class="single_add_to_cart_button btn outline">'
. __("Checkout the products in your cart", "borealis") . '</a>';
}
}
add_action( 'woocommerce_single_product_summary', 'go_to_cart', 31 );
add_action( 'init', 'custom_code_init' );
?>