You should change this block of code
if ( ! empty( $m_category ) ) {
foreach ( $m_category as $id ) {
$articles[ $key ]['Category '] = $m_category;
}
}
to be something like this:
if ( ! empty( $m_category ) ) {
// use $m_category->parent to check if it's a parent category or sub-category.
$articles[ $key ]['Category '] = $m_category->name; //category name from category object
}
Related Posts:
- WP WC CLI – WooCommerce setup store with wp-cli [closed]
- How does WooCommerce display a custom comment_type in Comment Admin?
- Custom Shipping method not showing in checkout
- How to prevent action in ajax request, when in admin side?
- Create or Update thousands of woocommerce products via PHP
- Is it possible to set up multistore in Woocommerce? [closed]
- How to remove the woocommerce_checkout_process action hook in woocommerce if particular project in cart [closed]
- HTML in WooCommerce settings
- Woocommerce plugin for minimum order and add-to-card-step
- How to stop activating a plugin and show admin notice when dependent plugins minimum version is not met
- woocommerce payment gateway callback not firing [closed]
- How to modify WCMP Rest API response?
- Fetch Children of Grouped Products Inside WooCommerce Product Loop
- Woocommerce dependent plugin
- How to check current user before all actions and filters?
- New databes tables with – WooCommerce – for developers [closed]
- Change commission_status paid when withdraw_status vendor is completed
- custom payment gateway in woocommerce failed to connect to remote api server
- Creating a Callback URL for WordPress Woocommerce to update Order Status
- How to export post 2 posts WordPress plugin data [closed]
- how to do login using woocommerce rest api From android
- Woocommerce Minimum Price for a Composite Product to add in cart
- How can I insert thousands of Woocommerce products by batch with PHP? [closed]
- Redirect to another page using contact form 7? [closed]
- WooCommerce – set session with new cart item meta when updating cart item quantity [closed]
- Get Every Key & Value from Array then Display All in New Line
- Add_rewrite_endpoint doesn’t work with post name permalink structure
- Add a “View all” button on WooCommerce product archives pages
- add seperate suffix for low price and high price in woocommerce
- Cross Sells are not being shown in Cart Page. Please Help!
- Error with get_price (and others) in self-written plugin to show price
- Search users with custom meta data
- WordPress custom plugin that uses woocommerce enabled payment gateway for payment [closed]
- Disable variations on woo commerce if out of stock
- How to add category and subcategory in WordPress custom code?
- Customizing $product->get_title() function
- WooCommerce – I want to add functionality of one plugin to another plugin — best approach?
- wp_query ‘s’ parameter does not work with WC_AJAX
- Grouping imported products and showing variations based on selected product
- Remove Zero Money From Previews Order woocommerce
- Visual composer custom element error
- How would I Redirect an existing WooCommerce customer to a specific url after Checkout
- How can i solve php upgrade problem
- Make downloadable ebook read online without download option
- woocommerce: Customize email with item total count
- show wc_add notices on particular page in woo commerce custom plugin development
- How to get the checkout form data from checkout page when place-order button is clicked
- Woocommerce convert simple products to variations
- How to make WooCommerce multiple filter with custom meta fields
- How to create a plugin with automatic update?
- category page multiple products add to cart any plugin available for woocommerce
- Getting all woocommerce products from REST API call in plugin
- “Enable Media Replace” plugin does not update serialized object in WPMeta
- Change Woo Custom Endpoint Titles from a Plugin
- Checkbox field that add a subscription product and change prices of other products in checkout and cart page
- Use Case: Multiple Shipping Methods per Order
- In woocommerce, is there any way to empty wordpress default mini cart when order placed?
- Get a list of Product Categories inside a loop
- wc_get_product_terms() throws “Notice: Undefined offset: 0”
- Woocommerce list variations that are added already to cart in Single Product
- Not displaying Woocommerce product page in lightbox
- Hide ‘add to cart’ button for some products [duplicate]
- Change pricing in Woocommerce based on Category and Product [closed]
- Adding/ Removing actions for plugins
- Problem with conditional woocommerce custom checkout field
- Unable to sync woocommerce variations
- woocommerce blank page after clicking add to cart [closed]
- Unable to show 4 products in a row
- The plugin generated xxx characters of unexpected output during activation
- Hook for single product thumbnail
- Predefine Product Variations for specific custom product type [closed]
- Create Custom Coupon Type
- How to create a “plugin” or “block” that can manipulate WordPress DOM in frontend?
- Template selector for woocommerce product
- Can we install 3d product configurator into wordpress
- How to use `$order->get_discount_total()`, avoiding defoult WC decimal rounding?
- A multi-section WordPress store [closed]
- Woocommerce Add Variation Product to Cart from custom link [closed]
- Show Similar Post Titles ( Similar to Stack Exchange )
- Add content to /wp-admin/plugin-install.php admin screens
- Need a function for changing saved post_date or post_date_gmt to relative time in wordpress
- How do I store information in a dynamic block in WordPress?
- How to generate video out of images via WordPress plugin
- Get plugin option in another PHP file
- How to use WP-CLI / WC-CLI to bulk import 1000s of products (variable and simple)?
- How to add a dvi tag to a shortcode then change a generated text using jQuery
- Translation issue with global variables
- Can’t create tables with my plugin
- using wp_cache in plugin
- How can I translate something in my class constructor of my plugin in WordPress?
- How to Fix WordPress multisite woocommerce 403 file error
- Define global variable in theme file and call that variable in plugin file
- Woocommerce Attribute price for non-variations
- Custom Plugin Update
- Change hook to add_action in a plugin class
- API Functions to Register and Show WordPress List Tables
- Why haven’t I see plugins using get_file_data to handle retrieving plugin version?
- Free multi dealer rental cars (sign up) [closed]
- is_user_logged_in() undefined at shutdown in plugin context
- What are Seeds? [closed]