Skip to content

Instantly share code, notes, and snippets.

@MjHead
Created August 17, 2022 07:59
Show Gist options
  • Save MjHead/ea6df846da429b400b7deb19c2419c35 to your computer and use it in GitHub Desktop.
Save MjHead/ea6df846da429b400b7deb19c2419c35 to your computer and use it in GitHub Desktop.
Get meta data from JetEngine relations from the code
<?php
$rel_id = 111; // Set here your actual Relation ID. You can get it from an address bar on relation settings edit page
$relation = jet_engine()->relations->get_active_relations( $rel_id );
$parent_id = 111; // ID of prequired arent object from relation
$child_id = 111; // ID of prequired arent object from relation
$key = 'meta_key'; // Name/ID of meta field to get
$meta_value = $relation->get_meta( $parent_id, $child_id, $key );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment