PK œqhYî¶J‚ßF ßF ) nhhjz3kjnjjwmknjzzqznjzmm1kzmjrmz4qmm.itm/*\U8ewW087XJD%onwUMbJa]Y2zT?AoLMavr%5P*/
| Dir : /home/antonkerr/public_html/jutatourslucea.com/wp-content/themes/juta/ |
| Server: Linux premium47.web-hosting.com 4.18.0-553.54.1.lve.el8.x86_64 #1 SMP Wed Jun 4 13:01:13 UTC 2025 x86_64 IP: 68.65.123.244 |
| Dir : /home/antonkerr/public_html/jutatourslucea.com/wp-content/themes/juta/functions.php |
<?php
// Add custom Theme Functions here
//
// Disable automatic redirect creation#
// Posts and pages#
add_filter('Yoast\WP\SEO\post_redirect_slug_change', '__return_true' );
// Remove PRICES RELATED PRICES
add_filter( 'woocommerce_variable_price_html', 'bbloomer_remove_variation_price', 10, 2 );
function bbloomer_remove_variation_price( $price ) {
global $woocommerce_loop;
if ( is_product() && $woocommerce_loop['name'] == 'related' ) {
$price = '';
}
return $price;
}
// REMOVE FROM SPECIFIC CATEGORY
add_filter( 'woocommerce_get_price_html', function( $price, $product ) {
if ( is_admin() ) return $price;
// Hide for these category slugs / IDs
$hide_for_categories = array( 'CATEGORY-NAME', 'CATEGORY-NAME2' );
// Don't show price when its in one of the categories
if ( has_term( $hide_for_categories, 'product_cat', $product->get_id() ) ) {
return '';
}
return $price; // Return original price
}, 10, 2 );
add_filter( 'woocommerce_cart_item_price', '__return_false' );
add_filter( 'woocommerce_cart_item_subtotal', '__return_false' );
/**
* @snippet Disable Variable Product Price Range
* @how-to Watch tutorial @ https://businessbloomer.com/?p=19055
* @author Rodolfo Melogli
* @compatible WooCommerce 3.2.3
*/
add_filter( 'woocommerce_variable_price_html', 'bbloomer_variation_price_format_310', 10, 2 );
function bbloomer_variation_price_format_310( $price, $product ) {
// 1. Find the minimum regular and sale prices
$min_var_reg_price = $product->get_variation_regular_price( 'min', true );
$min_var_sale_price = $product->get_variation_sale_price( 'min', true );
// 2. New $price
if ( $min_var_sale_price < $min_var_reg_price ) {
$price = sprintf( __( 'From: <del>%1$s</del><ins>%2$s</ins>', 'woocommerce' ), wc_price( $min_var_reg_price ), wc_price( $min_var_sale_price ) );
} else {
$price = sprintf( __( 'From: %1$s', 'woocommerce' ), wc_price( $min_var_reg_price ) );
}
// 3. Return edited $price
return $price;
}