• Resolved getyoowoo

    (@getyoowoo)


    When I save below code everything is still okay:

    add_filter(‘rp_wcec_custom_macros’, ‘yw_wcec_add_domain_name_macro’, 10, 5);

    function yw_wcec_add_domain_name_macro ($custom_macros, $args) {

    global $woocommerce, $post;
    $order = new WC_Order($post->ID);
    $order_id = $order->get_order_number();

    $domain = get_post_meta($order_id, ‘domain_name’, true);
    $domain_link = get_post_meta($order_id, ‘domain_link’, true);
    $domain_ssl = get_post_meta($order_id, ‘domain_ssl’, true);

    if ($domain_link == ‘Ja’) {

    if ($domain_ssl == ‘Ja’) {
    $domain_name = ‘https://’ . $domain;
    } else {
    $domain_name = ‘https://’ . $domain;
    }

    } else {

    $domain_name = ‘https://’ . pathinfo($domain, PATHINFO_FILENAME) . ‘yoowoo.nl’;

    }

    return array(‘domain_name’ => array(‘value’ => $domain_name));

    }

    but when I activate the (multi site) option to (de)activate the code induvidually for each site I get this error:

    Fatal error: Uncaught ErrorException: Trying to set invalid property on Snippets class: sharing in /home/users/******/yoowoo.nl/wp-content/plugins/code-snippets/php/class-snippet.php:131 Stack trace: #0 /home/users/******/yoowoo.nl/wp-content/plugins/code-snippets/php/admin-menus/class-edit-menu.php(198): Snippet->__set(‘sharing’, ‘on’) #1 /home/users/******/yoowoo.nl/wp-content/plugins/code-snippets/php/admin-menus/class-edit-menu.php(97): Code_Snippets_Edit_Menu->save_posted_snippet() #2 /home/users/******/yoowoo.nl/wp-content/plugins/code-snippets/php/admin-menus/class-edit-menu.php(83): Code_Snippets_Edit_Menu->process_actions() #3 /home/users/******/yoowoo.nl/wp-includes/class-wp-hook.php(298): Code_Snippets_Edit_Menu->load(”) #4 /home/users/******/yoowoo.nl/wp-includes/class-wp-hook.php(323): WP_Hook->apply_filters(”, Array) #5 /home/users/******/yoowoo.nl/wp-includes/plugin.php(453): WP_Hook->do_action(Array) #6 /home/users/******/yoowoo.nl/wp-admin/admin.php(212): do_action(‘load-snippets_p…’) in /home/users/******/yoowoo.nl/wp-content/plugins/code-snippets/php/class-snippet.php on line 131

    Any ideas why this suddenly happens? In the past this never has been an issue…

Viewing 1 replies (of 1 total)
  • Plugin Author Shea Bunge

    (@bungeshea)

    This was a bug in the plugin which was fixed in version 2.9.0. Thank you very much for taking the time to report this, and my apologies for taking so long to fix it.

Viewing 1 replies (of 1 total)
  • The topic ‘Bug? Fatal error: Uncaught ErrorException’ is closed to new replies.