• Resolved ibrahimi3

    (@ibrahimi3)


    I get this error when I click on “Create Template Option” with all the settings in order

    Fatal error: Uncaught Error: Call to undefined function write_log()
    in C:\laragon\www\wpdev\wp-content\plugins\bp-email-assign-templates\pp-email-templates-admin.php on line 216

    Call stack:

    pp_etemplates_create_option()
    wp-content/plugins/bp-email-assign-templates/pp-email-templates-admin.php:274
    pp_etemplates_admin_screen()
    wp-includes/class-wp-hook.php:303
    WP_Hook::apply_filters()
    wp-includes/class-wp-hook.php:327
    WP_Hook::do_action()
    wp-includes/plugin.php:470
    do_action()
    wp-admin/admin.php:259
    require_once()
    wp-admin/edit.php:10

    I noticed that the function was not defined so I did something like this

    if (!function_exists('write_log')) {
    
        function write_log($log) {
            if (true === WP_DEBUG) {
                if (is_array($log) || is_object($log)) {
                    error_log(print_r($log, true));
                } else {
                    error_log($log);
                }
            }
        }
    
    }

    Also, I would like to know if there is any way I can contribute to the plugin development.

    • This topic was modified 3 years, 3 months ago by ibrahimi3.
    • This topic was modified 3 years, 3 months ago by ibrahimi3.
Viewing 1 replies (of 1 total)
  • Plugin Author shanebp

    (@shanebp)

    Thanks for the bug report. It has been fixed in Version 1.4
    What and how do you want to contribute?
    If you mean code, do you know how to create a pull-request in github repos?

Viewing 1 replies (of 1 total)
  • The topic ‘Error on creating template option’ is closed to new replies.