O Pedido deve ter o valor mínimo de R$ %s.Frete gratuito para compras acima de R$ 100,00. Valores de R$50,00 até R$ 99,99 será cobrado uma taxa de entrega.ATENÇÃO: ENTREGAS SOMENTE EM TREMEMBÉ-SP.'
.' O Valor total do seu pedido agora é de R$ %s.'
.$msg,
number_format((float)$minimum_cart_total, 2, ',', ''),
number_format((float)$total, 2, ',', ''),
$saldo_dec ),
'error' );
}
}
}
}
*/
// comment form fields re-defined:
add_filter( 'comment_form_default_fields', 'mo_comment_fields_custom_html' );
function mo_comment_fields_custom_html( $fields ) {
// first unset the existing fields:
unset( $fields['comment'] );
unset( $fields['author'] );
unset( $fields['email'] );
unset( $fields['url'] );
// then re-define them as needed:
$fields = [
'comment_field' => '',
'author' => '',
'email' => '',
'url' => ''
];
// done customizing, now return the fields:
return $fields;
}
// remove default comment form so it won't appear twice
add_filter( 'comment_form_defaults', 'mo_remove_default_comment_field', 10, 1 );
function mo_remove_default_comment_field( $defaults ) { if ( isset( $defaults[ 'comment_field' ] ) ) { $defaults[ 'comment_field' ] = ''; } return $defaults; }
function wpdocs_custom_excerpt_length( $length ) {
return 20;
}
add_filter( 'excerpt_length', 'wpdocs_custom_excerpt_length', 999 );
function lv2_add_bootstrap_input_classes( $args, $key, $value = null ) {
/* This is not meant to be here, but it serves as a reference
of what is possible to be changed.
$defaults = array(
'type' => 'text',
'label' => '',
'description' => '',
'placeholder' => '',
'maxlength' => false,
'required' => false,
'id' => $key,
'class' => array(),
'label_class' => array(),
'input_class' => array(),
'return' => false,
'options' => array(),
'custom_attributes' => array(),
'validate' => array(),
'default' => '',
); */
// Start field type switch case
switch ( $args['type'] ) {
case "select" : /* Targets all select input type elements, except the country and state select input types */
$args['class'][] = 'form-group'; // Add a class to the field's html element wrapper - woocommerce input types (fields) are often wrapped within a tag
$args['input_class'] = array('form-control', 'input-lg'); // Add a class to the form input itself
//$args['custom_attributes']['data-plugin'] = 'select2';
$args['label_class'] = array('control-label');
$args['custom_attributes'] = array( 'data-plugin' => 'select2', 'data-allow-clear' => 'true', 'aria-hidden' => 'true', ); // Add custom data attributes to the form input itself
break;
case 'country' : /* By default WooCommerce will populate a select with the country names - $args defined for this specific input type targets only the country select element */
$args['class'][] = 'form-group single-country';
$args['label_class'] = array('control-label');
break;
case "state" : /* By default WooCommerce will populate a select with state names - $args defined for this specific input type targets only the country select element */
$args['class'][] = 'form-group'; // Add class to the field's html element wrapper
$args['input_class'] = array('form-control', 'input-lg'); // add class to the form input itself
//$args['custom_attributes']['data-plugin'] = 'select2';
$args['label_class'] = array('control-label');
$args['custom_attributes'] = array( 'data-plugin' => 'select2', 'data-allow-clear' => 'true', 'aria-hidden' => 'true', );
break;
case "password" :
case "text" :
case "email" :
case "tel" :
case "number" :
$args['class'][] = 'form-group';
//$args['input_class'][] = 'form-control input-lg'; // will return an array of classes, the same as bellow
$args['input_class'] = array('form-control', 'input-lg');
$args['label_class'] = array('control-label');
break;
case 'textarea' :
$args['input_class'] = array('form-control', 'input-lg');
$args['label_class'] = array('control-label');
break;
case 'checkbox' :
break;
case 'radio' :
break;
default :
$args['class'][] = 'form-group';
$args['input_class'] = array('form-control', 'input-lg');
$args['label_class'] = array('control-label');
break;
}
return $args;
}
add_filter('woocommerce_form_field_args','lv2_add_bootstrap_input_classes',10,3);
add_action( 'wp_enqueue_scripts', 'wsis_dequeue_stylesandscripts_select2', 100 );
function wsis_dequeue_stylesandscripts_select2() {
if ( class_exists( 'woocommerce' ) ) {
wp_dequeue_style( 'selectWoo' );
wp_deregister_style( 'selectWoo' );
wp_dequeue_script( 'selectWoo');
wp_deregister_script('selectWoo');
}
}
add_filter('woocommerce_get_catalog_ordering_args', 'tk_woocommerce_catalog_orderby');
function tk_woocommerce_catalog_orderby( $args ) {
if( is_product_category() ) {
$args['orderby'] = 'meta_value_num';
$args['order'] = 'ASC';
$args['meta_key'] = '_price';
}
return $args;
}
/* FUNÇÃO DE ESCONDER PREÇO
add_filter('woocommerce_get_price_html','show_price_logged');
//add_filter( 'woocommerce_is_purchasable', '__return_false' );
function show_price_logged($price){
if(is_single('35579')) { return $price; } else {
remove_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_add_to_cart', 30 );
return 'Solicitar orçamento pelo WhatsApp
Devido aos problemas na economia global causados pela pandemia de Coronavirus, o preço do Ouro está com variações constantes. Pedimos a gentileza de solicitar um orçamento diretamente por WhatsApp
';
}
} */
remove_action('wp_head', 'wp_generator'); Warning: Cannot modify header information - headers already sent by (output started at /home/u669936802/domains/oliverjoias.com.br/public_html/wp-content/themes/oliverjoias/functions.php:1) in /home/u669936802/domains/oliverjoias.com.br/public_html/wp-includes/pluggable.php on line 1435
Warning: Cannot modify header information - headers already sent by (output started at /home/u669936802/domains/oliverjoias.com.br/public_html/wp-content/themes/oliverjoias/functions.php:1) in /home/u669936802/domains/oliverjoias.com.br/public_html/wp-includes/pluggable.php on line 1438