Hi Diego,
I have contacted theme support and the found the issue is related to my funtions.php within the child theme. I'm not sure where to find to code that's going wrong or have been written wrong?
<?php
/* Custom functions code goes here. */
/* Sortering dropdown verwijderen/ */
remove_action( 'woocommerce_before_shop_loop', 'woocommerce_catalog_ordering',30 );
/**
* Change number of products that are displayed per page (shop page)
*/
add_filter( 'loop_shop_per_page', 'new_loop_shop_per_page', 20 );
function new_loop_shop_per_page( $cols ) {
// $cols contains the current number of products per page based on the value stored on Options -> Reading
// Return the number of products you wanna show per page.
$cols = 9999;
return $cols;
}
/* UPSOLUTION WOOCOMMERCE ATTRIBUTES GRID BUILDER ADD-ON */
add_shortcode('attr-woo-sale', 'us_get_woo_attr_sale');
function us_get_woo_attr_sale(){
global $product;
$att = $product->get_attribute( 'sale' );
return $att;
}
/* VERWIJDEREN TABBLADEN DESCRIPTION EN ADDITIONAL INFORMATION */
remove_action( 'woocommerce_after_single_product_summary', 'woocommerce_output_product_data_tabs', 10 );
// Change "You may also like" into "Family"
add_filter('gettext', 'translate_like');
add_filter('ngettext', 'translate_like');
function translate_like($translated) {
$translated = str_ireplace('You may also like…', 'FAMILY', $translated);
return $translated;
}
/* TOEGEVOEGD NAV TICKET TOOLSET IP WAARDES */
function has_woo_attr_term($term, $tax){
$res = '0';
if(has_term($term, $tax, null)){
$res = '1';
}
return $res;
}
/* PRODUCT SKU SHORTCODE */
function display_woo_sku() {
global $product;
return $product->get_sku();
}
add_shortcode( 'woo_sku', 'display_woo_sku' );
/* UPSELL TOEVOEGEN ALS FAMILY PRODUCTS */
function func_get_product_upsell_ids() {
global $post;
$product = new WC_Product($post->ID);
$upsells = $product->get_upsell_ids();
$upsells = isset($upsells[0]) ? $upsells : array(0);
return join(",",$upsells);
}
add_shortcode( 'get_upsell_ids', 'func_get_product_upsell_ids' );
/* CROSS SELL TOEVOEGEN ALS RELATED PRODUCTS */
function func_get_product_cross_sell_ids() {
global $post;
$product = new WC_Product($post->ID);
$cross_sells = $product->get_cross_sell_ids();
$cross_sells = isset($cross_sells[0]) ? $cross_sells : array(0);
return join(",",$cross_sells);
}
add_shortcode( 'get_cross_sell_ids', 'func_get_product_cross_sell_ids' );
/* DATASHEET FILTER */
add_filter('wpv_filter_query', function($query_args, $view_settings, $view_id){
if($view_id == 61161){
$query_args['post_type'] = 'product_variation';
}
return $query_args;
}, 10, 3);
/* PARENT SKU FOR PRODUCT TABLE LINK */
function wc_get_product_id_by_variation_sku($sku) {
$args = array(
'post_type' => 'product_variation',
'meta_query' => array(
array(
'key' => '_sku',
'value' => $sku,
)
)
);
// Get the posts for the sku
$posts = get_posts( $args);
if ($posts) {
return $posts[0]->post_parent;
} else {
return false;
}
}
add_shortcode( 'get_parent_sku', 'wc_get_product_id_by_variation_sku' );
/* DATASHEET PRODUCT ATTRIBUTES */
add_shortcode( 'show-product-attribute', 'show_product_attribute_func');
function show_product_attribute_func($atts){
$attribute = $atts['attribute'];
if ( !empty($attribute) ) {
global $product;
$value = $product->get_attribute( $attribute );
if (!empty($value)) {
return $value;
}
}
}
?>