How to get all child categories of current parent category in product detail page of woocommerce? [closed]

This is how you display all child terms of a parent term: $term_id = 8; // id of your clothes category $taxonomy_name=”your_taxonomy”; // e.g. ‘category’ $termchildren = get_term_children( $term_id, $taxonomy_name ); if ( !empty($termchildren) ) { foreach ($termchildren as $termchild) { $term = get_term_by( ‘id’, $child, $taxonomy_name ); // Do things } } See https://developer.wordpress.org/reference/functions/get_term_children/

Detect Product Type with code

The is_virtual() method in WC_Product class it return boolean. It means that, if $product->is_virtual() return true, it is virtual product, vice versa if return false, then the product is physical. In your case, you can use this if( $product->is_virtual() ) { //is Virtual Product, do something here } if( !$product->is_virtual() ) { //is Physical Product, … Read more

I want to Display custom woocomerce meta box in orders list

Solved it here is the answer add_action( ‘manage_shop_order_posts_custom_column’, ‘delivery_company_order_column_content’, 10, 2 ); function delivery_company_order_column_content( $column, $post_id ) { if ( $column === ‘delivery_company_order’ ) { $order = wc_get_order( $post_id ); $delivery_company = get_post_meta( $order->get_id(), ‘delivery_company’, true ); $delivery_company_name = get_the_title( $delivery_company ); echo $delivery_company_name; } } add_filter(‘manage_edit-shop_order_columns’, ‘delivery_company_order_column’); function delivery_company_order_column($columns) { $columns[‘delivery_company_order’] = ‘Delivery Company’; … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)