简体   繁体   中英

Wordpress PHP fatal error: Call to undefined function

Customers cannot access their account details, and are met with the following error:

Fatal error: Call to undefined function validate_form_data() in /wpsc-account-edit-profile.php on line 14

This is from wpsc-account-edit-profile.php

<form method="post">

<?php echo validate_form_data(); ?>

<table>

    <?php wpsc_display_form_fields(); ?>

    <tr>
        <td></td>
        <td>
            <input type="hidden" value="true" name="submitwpcheckout_profile" />
            <input type="submit" value="<?php _e( 'Save Profile', 'wpsc' ); ?>" name="submit" />
        </td>
    </tr>
</table>

Specifically Line 14:

<?php echo validate_form_data(); ?>

Does anyone have an idea what the problem is and how it could possibly be fixed? Thanks!

The validate_form_data() function is defined in functions/wpsc-user_log_functions.php so you need to ensure your WPSC theme includes the appropriate file to make the function available.

Depending on what version and theme you are using you can use the following where you setup your theme includes

require_once( WPSC_CORE_THEME_PATH . 'functions/wpsc-user_log_functions.php' );

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM