WooCommerce: Bulk Quantity in Cart

Problem is on cart page has_term is false because it is checking if cart page have terms 12-pack or 6-pack. You also need to provide post object/ID to has_term() as a third parameter. Updated code:- function input_set_all_values( $args, $product ) { if (( has_term(‘6-pack’, ‘criteria’, $product->post ) ) ) { $args[‘step’] = 6; $args[‘min_value’] = … Read more

Display x number of terms and exclude hidden

Googling get_terms gives the WP developer hub page for get_terms as the first result, for which the first example is this: $terms = get_terms( ‘post_tag’, array( ‘hide_empty’ => false, ) ); Using this as a basis we get: $args = array( ‘taxonomy’ => ‘product_cat’, ‘number’ => 5, ‘orderby’ => ‘name’, ‘parent’ => 11, ‘hide_empty’ => … Read more

Adding my own custom template page but got white page

I think it would be best to do a template override in Woocommerce. If by single you mean a page when viewing only one product then look at the single-product.php template. The directory it needs to located is: /public_html/wp-content/themes/your-theme/woocommerce/single-product.php. You can download the template overrides from woothemes.