Skip to main content
deleted 3 characters in body
Source Link
Mac
  • 313
  • 1
  • 3
  • 14

So i found a "solution" even though it's not as good as i hoped - or atleast not as good as the way it was done pre 3.0.

$iOrderID = $_POST['iOrderID'];
$aBookingQuery = new WP_Query( 
    array( 
        'post_parent'       => (int)$iOrderID,
        'post_type'         => 'wc_booking',
        'posts_per_page'    => 1 
        )
    );
$iBookingID = $aBookingQuery->posts[0]->ID;
$iBookingRessoureceID = get_post_meta(186$iBookingID)['_booking_resource_id'][0];

this gives you the ressource ID of said booked product.

So i found a "solution" even though it's not as good as i hoped - or atleast not as good as the way it was done pre 3.0.

$iOrderID = $_POST['iOrderID'];
$aBookingQuery = new WP_Query( 
    array( 
        'post_parent'       => (int)$iOrderID,
        'post_type'         => 'wc_booking',
        'posts_per_page'    => 1 
        )
    );
$iBookingID = $aBookingQuery->posts[0]->ID;
$iBookingRessoureceID = get_post_meta(186)['_booking_resource_id'][0];

this gives you the ressource ID of said booked product.

So i found a "solution" even though it's not as good as i hoped - or atleast not as good as the way it was done pre 3.0.

$iOrderID = $_POST['iOrderID'];
$aBookingQuery = new WP_Query( 
    array( 
        'post_parent'       => (int)$iOrderID,
        'post_type'         => 'wc_booking',
        'posts_per_page'    => 1 
        )
    );
 = $aBookingQuery->posts[0]->ID;
$iBookingRessoureceID = get_post_meta($iBookingID)['_booking_resource_id'][0];

this gives you the ressource ID of said booked product.

Source Link
Mac
  • 313
  • 1
  • 3
  • 14

So i found a "solution" even though it's not as good as i hoped - or atleast not as good as the way it was done pre 3.0.

$iOrderID = $_POST['iOrderID'];
$aBookingQuery = new WP_Query( 
    array( 
        'post_parent'       => (int)$iOrderID,
        'post_type'         => 'wc_booking',
        'posts_per_page'    => 1 
        )
    );
$iBookingID = $aBookingQuery->posts[0]->ID;
$iBookingRessoureceID = get_post_meta(186)['_booking_resource_id'][0];

this gives you the ressource ID of said booked product.