I have found the answer. It is for anyone who might find it helpful:
get_post_meta(ID, '_related_course', true);
Here ID will be the WooCommerce Product ID. It will output the course id in array. Just need to extract the ID from there.
Related Posts:
- Redirect to another page using contact form 7? [closed]
- woocommerce remove coupon link does not work
- Adding a text domain to every __(), _e() and __n() gettext call without a plan to create own translations
- Create WooCommerce Product Category Programmatically
- Can we completely remove the WordPress Sitemaps (WordPress 5.5)?
- Update Multiple Post Meta for the Same Post In One call?
- Updating WooCommerce variable product stock issue
- How to save Clicks of a download link button while it doesn’t matter if we refresh the page or again login/logout
- Custom Shipping method not showing in checkout
- Sort products without thumbnail in WooCommerce shop page
- Create or Update thousands of woocommerce products via PHP
- Add multiple attributes to product from php
- How do you remove plugin edit option?
- Make specific products accessible only to a user role in WooCommerce
- How to get subscription key or id using Woocommerce Subscriptions [closed]
- How can I display a contact form for out of stock products in WooCommerce?
- WooCommerce get_price returning wrong price when used via ajax
- Open Post Thumbnail in New Child Theme File in WordPress
- Add Product Subtitle to Woocommerce Product Page
- woocommerce 3.2.1 not sending order notification emails
- WooCommerce Custom Product to checkout
- Automatically add attributes to woocommerce product?
- How to enable specific plugin only based around shop manager role?
- WooCommerce: Building a page with user input which is used to query order status and external API and return a result
- Replacing a plugin function with a custom renamed function doesn’t work
- WooCommerce specifc variations for specific user role [closed]
- What are the specifics of WordPress development I need to know? [closed]
- PHP Error When a plugin is active
- How to show the number of website visitors in my theme
- Show icons or badges under title on product archives/category pages
- Redeclare function after plugin activation
- Woocommerce Backend Search by Title and SKU
- WooCommerce Shopping Cart Not Initially Showing Products [closed]
- How to add a new column with text fields to WooCommerce Cart List?
- I am trying to make a field show and save from quickedit screen
- Woocommerce singe product custom gallery output works just on the first slide
- How to include a custom field in the woocommerce email?
- Remove Pagination for Product Category Pages WooCommerce
- How to display registered customer list as dropdown in WooCommerce checkout?
- How to change WooCommece variation data programmtically [closed]
- .php file for woocommerce edit category? [closed]
- Override a Plugin Function
- WordPress custom post type image in RSS
- dynamically create callback functions inside a for loop
- Inserting Plugins Into Blank Space of Externally Designed WordPress Theme
- Add key and value to an array in another file
- How to change layout of shop page in wordpress? [closed]
- Theme Functions run a function upon activation or preview
- Code for unique user visit count on every page WordPress
- Get product categories and add them to a custom taxonomy
- How to makes changes on the shop/category/tag pages but not on the product pages in woocommerce?
- need to find duplicated meta value in custom filed and view the posts that have the same value
- How to add custom plugin data to the cart in woocommerce using custom button on product page?
- how to display recent post by category on home page
- How to get brand children with woocommerce brands
- Display top level parent category as a single product body class (Woocommerce)
- Show prices with tax Inclusive in Minicart widget
- Newbie problem with adding include wp_footer
- woocommerce: Customize email with item total count
- Plugin which unlock free gift when you reach some amount in cart
- is there a way to display product gallery images via cdn
- Submitting form to PHP
- Adding discount functionality to the cart
- How to assign a specific service to a specific provider based on location
- Rename a folder via HTML POST request
- How to get a post views count using ‘WordPress popular posts’ plugin
- How can I see $post object in frontend from functions.php?
- Google Maps for Woocommerce Checkout
- How much PHP and MySQL or MariaDB knowledge should I know to start writing WordPress themes and plug-ins and whatever else a beginner can edit?
- my hook or my function wont run in the cronjob
- Add a WooCommerce Product Variant with attributes programmatically
- Change Woo Custom Endpoint Titles from a Plugin
- Change Jobs for WordPress templates
- Woocommerce – Change variations output
- Configuring default woo commerce login with modal popup
- Woocommerce list variations that are added already to cart in Single Product
- redirect to a custom page
- Change pricing in Woocommerce based on Category and Product [closed]
- How to change the product short description for each product with PHP?
- Problem with conditional woocommerce custom checkout field
- How to allow customers to input a text as a product variation *and* charge per character?
- Woocommerce: deleted single-product.php, everything still works. How is it possible?
- How to copy data from user profile page (profile.php) to theme customizer
- Can anyone tell me why I can’t edit a plugin when it is installed without having to re-install?
- Unable to show 4 products in a row
- Move related products after product summary? [closed]
- is_plugin_active() not defined on active plugin, in the thumbnails.php file
- WooCommerce custom query and paging: Not Found error
- How to execute init or woocommerce_init only for checkout page
- Visual Composer Data Source?
- Woocommerce disable checkout on specific day
- Populate Woocommerce order notes with custom field value
- Woocommerce Product Add-ons – Auto-select first option
- Translate text for empty product
- Adding a script & php to functions.php
- How to add a text in the checkout page woocomerce?
- Shortcode inside a redirect [closed]
- How to add a static image inbetween the product tiles on main shoppage woocommerce?
- I want create woocommerec match products columns
- How to create different woocommerce single_product.php pages for each product? [closed]