• Resolved janvasek

    (@janvasek)


    Hi there, i would like to get ids of products, that are filled in the Custom related product settings

    I try this

    $related_products_ids = wc_get_related_products($product->get_id(), 3);

    but this code gets ids only from default inputs upsell, crosell

    I need get ids from plugins inputs

    Thank you for help

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Support WebToffee Support

    (@webtoffeesupport)

    Hi @janvasek ,

    Greetings from WebToffee Support!

    Thank you for reaching out to us regarding your requirement.

    Currently, the Related Products – Product Recommendations for WooCommerce plugin does not have a built-in API function to retrieve the related product IDs configured via the product edit page. However, you can obtain the related product IDs by accessing the post meta data using get_post_meta.

    Here are the meta keys you can use to fetch the related product data:

    • _crp_related_ids
    • _crp_related_product_cats
    • _crp_related_product_tags
    • _crp_related_product_attr

    Please note that this data will only be available for products that have custom related products configured.

    If you need further assistance or have any questions, feel free to let us know.

    Plugin Support WebToffee Support

    (@webtoffeesupport)

    Hi?@janvasek ,

    We haven’t heard back from you for a while. As this thread has been inactive for some time, we are marking it as resolved.

    If you require any further assistance, please reach out to us using a new thread.

Viewing 2 replies - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.