function _colabs_activate_pricing($order) { $post_id = $order->get_post_type_id(); $post = get_post($post_id); if (COLABS_POST_TYPE == $post->post_type) { if (_colabs_needs_publish($post)) { colabs_update_post_status($post_id, 'publish'); } _colabs_set_post_duration($post_id); } }
function colabs_handle_property_confirmation() { if (empty($_POST['property_confirm'])) { return; } if (!($property_id = intval($_POST['ID']))) { $errors = colabs_get_listing_error_obj(); $errors->add('submit_error', __('<strong>ERROR</strong>: Cannot update property status. Property ID not found.', 'colabsthemes')); return; } colabs_update_post_status($property_id); _colabs_set_post_duration($property_id); do_action('colabs_activate_post', $property_id); wp_redirect(get_permalink($property_id)); exit; }