Uncaught Error: Call to undefined function get_submit_button()
-
Hi!
I have a pretty simple plugin with a WordPress button. I have been using the following code for a while now:
$button_html = get_submit_button('Register', 'primary', 'submit_button_name', false, $args); $button_with_link = '<a href="' . get_option('events_page_registration') . '?eid=' . $row->id . '">' . $button_html . '</a>'; echo "<p>{$button_with_link}</p>";
It works fine in the page when I look at it from the website. But Elementor really finds this hard to do, because everytime I try to edit the page in Elementor it shows me this:
Error 500: Click her for preview debug
When I click in the link for preview, it shows me this:
Uncaught Error: Call to undefined function get_submit_button() in /var/www/vhosts/HOST/DOMAIN/wp-content/plugins/PLUGIN/includes/shortcodes_event.php:139
Which is the line that uses the get_submit_button(…).
Why is this happening all of a sudden? I did get the shortcode inside the page, so it worked once.
- The topic ‘Uncaught Error: Call to undefined function get_submit_button()’ is closed to new replies.