• Resolved hardesfred

    (@hardesfred)


    I also get the 500 with version 1.6, but on the back-office.
    The problem is the inclusion of your helper files, causing some functions to not be loaded :

    
    Uncaught Error: Call to undefined function cart_contains_quotable() in /quotes-for-woocommerce/quotes-woocommerce.php:686
    

    Solution was to increase the priority of the actions (to 1 instead of 5) in quotes-woocommerce.php, lines 67,68 :

    
      add_action( 'init', array( &$this, 'qwc_include_files' ), 1 );
      add_action( 'admin_init', array( &$this, 'qwc_include_files_admin' ), 1 );
    

    Also, you use a deprecated woocommerce filter : “wc_add_to_cart_message”.
    You should use “wc_add_to_cart_message_html” instead in quotes-woocommerce.php line 92.

    One more thing, could you please add the “sent_to_admin”, “plain_text” and “email” variables to the array when you fetch the email templates ? It’s in includes/emails/class-* , functions get_content_html() and get_content_plain().
    Incidentally, there’s a typo in class-qwc-send-quotes : “send_to_admin” should be “sent_to_admin”.
    This way it’s compatible with woocommerce templates.

    And a last one : could you place your plugin’s options in the “Emails” tab in woocommerce’s settings page instead of having a separate admin menu entry ?

    • This topic was modified 5 years, 7 months ago by hardesfred.
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Correction for v1.6 admin error 500 and more’ is closed to new replies.