Create A Relationship Between CPT And Comments (WooCommerce Reviews)

Support MB Relationships Create A Relationship Between CPT And Comments (WooCommerce Reviews)

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #44827
    ZakirZakir
    Participant

    I am using WooCommerce and so I have a CPT for 'Products'.
    I also use Metabox to create a CPT for 'Educators'.
    I have also created a relationship between Products and Educators.

    Now in WooCommerce, customers can submit a review for the product. I want to relate the review that the customer submits for the product with the educator such that I can display that specific review on the educator's single template.
    I also want to display other reviews for the educator from other products on the educator single template.

    Is this possible with Metabox?

    #44835
    PeterPeter
    Moderator

    Hello Zakir,

    It is possible. You can follow the documentation below to get the related products to the educator
    https://docs.metabox.io/extensions/mb-relationships/#getting-connected-items

    then get the reviews by the product ID
    https://stackoverflow.com/questions/65708765/woocommerce-get-reviews-from-products-in-array-and-sort-them-by-stars

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