Reply to: tickets(385635)
Replies for tickets on suppota
Good morning Asham,
Did you have a chance to look at this?
Thank you
Thank you Ashan,
Now you’ve got the OP, the .ics file in the right format will help everybody.
Let’s hope eventON 4.9.6 will come soon.
BTW: I have updated the plugin with author setting:
add_action(‘init’, function () {
if (isset($_POST[‘opret_event’])) {
$address = sanitize_text_field($_POST[‘address’]);
$date = sanitize_text_field($_POST[‘date’]);
$start_time = sanitize_text_field($_POST[‘start_time’]);
$end_time = sanitize_text_field($_POST[‘end_time’]);
try {
$start_dt = new DateTime(“$date $start_time”);
$end_dt = new DateTime(“$date $end_time”);
$start_ts = $start_dt->getTimestamp();
$end_ts = $end_dt->getTimestamp();
// Opret event
$event_id = wp_insert_post([
‘post_title’ => ‘Privat Loppemarked’,
‘post_content’ => ‘Adresse: ‘ . $address,
‘post_status’ => ‘draft’,
‘post_type’ => ‘ajde_events’,
]);
if ($event_id) {
// Tidsfelter
update_post_meta($event_id, ‘_start’, $start_ts);
update_post_meta($event_id, ‘_end’, $end_ts);
update_post_meta($event_id, ‘evcal_srow’, $start_ts);
update_post_meta($event_id, ‘evcal_erow’, $end_ts);
update_post_meta($event_id, ‘evcal_allday’, ‘no’);
update_post_meta($event_id, ‘evcal_hide_endtime’, ‘no’);
// Opret location term hvis den ikke eksisterer
$existing_location = term_exists($address, ‘event_location’);
if (!$existing_location) {
$new_location = wp_insert_term($address, ‘event_location’);
if (!is_wp_error($new_location)) {
$location_id = $new_location[‘term_id’];
} else {
$location_id = 0;
}
} else {
$location_id = $existing_location[‘term_id’];
}
// Tildel location til eventet via term_id
if ($location_id) {
wp_set_object_terms($event_id, $location_id, ‘event_location’);
}
// Opdater location meta-informationer korrekt
update_post_meta($event_id, ‘evcal_location_name’, $address); // Tilføjer location name korrekt
update_post_meta($event_id, ‘evcal_location_address’, $address); // Tilføjer location address korrekt
// Farve på eventet
update_post_meta($event_id, ‘evcal_event_color’, ‘#f39c12’);
// Tilføj event type
wp_set_object_terms($event_id, ‘Privat loppemarked’, ‘event_type’, true);
// Tildel forfatteren til “rasmusheise”
$user = get_user_by(‘login’, ‘rasmusheise’);
if ($user) {
// Opdater forfatteren til eventet
$update_post = [
‘ID’ => $event_id,
‘post_author’ => $user->ID,
];
wp_update_post($update_post);
} else {
// Fejl: Bruger findes ikke
set_transient(‘eventon_form_message’, ‘Fejl: Bruger “rasmusheise” findes ikke.’, 10);
wp_redirect($_SERVER[‘REQUEST_URI’]);
exit;
}
// Bekræftelse og redirect
set_transient(‘eventon_form_message’, ‘Event oprettet!’, 10);
wp_redirect($_SERVER[‘REQUEST_URI’]);
exit;
} else {
set_transient(‘eventon_form_message’, ‘Fejl: kunne ikke oprette event’, 10);
wp_redirect($_SERVER[‘REQUEST_URI’]);
exit;
}
} catch (Exception $e) {
set_transient(‘eventon_form_message’, ‘Fejl i dato eller tidspunkt’, 10);
wp_redirect($_SERVER[‘REQUEST_URI’]);
exit;
}
}
});
No specific issues, just after testing not the right sollution for us.
In regards to the purchase code, I am not really sure since it’s not clear at all. For the base plugin I believe its thius: Item Purchase Code:
b3592463-beaa-412c-b46d-1ec3eafa44d7. For the extension it really does say ordernumber 207825 on the invoice. Let me know if theres anything else you need.
Ok let me try it.
also see video below
When I check the website in Troubleshooting Mode, it works:
Could you please try the instructions mentioned in this documentation?
debug.log doesn’t have any errors related to the issue.
I was able to submit this event
https://wnyfundraiser.com/events/daves-test/
(i set it to way into the future)
and I could edit it in the event manager and also in the backend no issues
Thanks Ashan
The latest update appears to have resolved it.
Best Regards