Show subcategory name selected in specific category woocoommerce

To display only assigned category you need to change hide_empty to true. Please see the modified code: $args = array( ‘hierarchical’ => 1, ‘show_option_none’ => ”, ‘hide_empty’ => true, ‘parent’ => 134, ‘taxonomy’ => ‘product_cat’ ); $subcats = get_categories($args); echo ‘<ul class=”wooc_sclist”>’; foreach ($subcats as $sc) { $link = get_term_link( $sc->slug, $sc->taxonomy ); echo ‘<li><a … Read more

Proper use of Output Buffer for a whole php clas

Your code does not need to use output buffering anywhere. There’s nowhere that you need it. Your shortcode function is already properly using return for the output output, so nothing needs to be captured, and your popup_bootmodal_form() function is outputting in wp_footer, which is fine, and doesn’t need to be captured either.

Add Product Permalink in woocommerce admin order page

There’s no permalink property of a product. Permalinks are not stored in the database, because they’re generated based on a number of external factors. Therefore you need to use a function to retrieve the permalink. In WooCommerce the best way to do this is with: function fpd_custom_order_item_values($_product) { $url = $_product->get_permalink(); echo ‘<p>’ . esc_url( … Read more