• Resolved Rúben Martins

    (@rubenmartins)


    I update the plugin to version 1.0.5(the latest.

    And now ths plugin stop work in front office
    this is the error

    Fatal error: Cannot redeclare salon_date_hoursbefore() (previously declared in /wp-content/plugins/salon-booking-system/views/shortcode/salon_date.php:8) in /wp-content/plugins/salon-booking-system/views/shortcode/salon_date.php on line 22

    What can i do? i tryed to reinstal the plugin manualy, Reset the settings but without any progress..

    https://wordpress.org/plugins/salon-booking-system/

Viewing 4 replies - 1 through 4 (of 4 total)
  • Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    @wordpresschef, Can you not ask for someone’s credentials? The point of the forums is to provide support here. Also, have you reviewed the WordPress trademark policy that states you can’t have “WordPress” in any top level domain?

    Plugin Author Dimitri Grassi

    (@wordpresschef)

    Hi @andrew you are right but that was the only way to assist the user as we are not able to recreate that error.
    Concerning the WordPress trademark policy we are moving on new domanin: wpchef.it

    @ruben could you follow this instruction:

    – Activate the plugin
    – Go to Settings > Booking rules
    – Change booking system (from basic to advanced)
    – Save options
    – Change again booking system (from advanced to basic)

    Let us know if this has solved the issue

    Thread Starter Rúben Martins

    (@rubenmartins)

    To solve the problem temporarily i removed the function salon_date_hoursbefore from salon_date.php and placed the content directly in line 37
    <?php salon_date_hoursbefore($plugin->getAvailabilityHelper()->getHoursBeforeString()) ?>
    —————————–
    By
    [Moderator note: code fixed. Please wrap code in the backtick character or use the code button.]

    <?php $hoursBefore = $plugin->getAvailabilityHelper()->getHoursBeforeString();
    if ($hoursBefore->from && $hoursBefore->to) : ?>
            <em><?php echo sprintf(
                    __('you may book from %s up to %s in advance', 'sln'),
                    $hoursBefore->from,
                    $hoursBefore->to
                ) ?></em>
        <?php elseif ($hoursBefore->from): ?>
            <em><?php echo sprintf(__('you may book %s in advance', 'sln'), $hoursBefore->from) ?></em>
        <?php
        elseif ($hoursBefore->to) : ?>
            <em><?php echo sprintf(__('you may book up to %s in advance', 'sln'), $hoursBefore->to) ?></em>
        <?php endif;

    And that solved the problem with redeclare salon_date_hoursbefore

    But now to try your solution i just removed the plugin and reinstaled from wordpress plugins directory and it works fine…
    i checked the salon_date.php file and the original function witch is causing the issue its ok…

    I don’t understand why now its working…

    Plugin Author Dimitri Grassi

    (@wordpresschef)

    thank you for the feedback.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Fatal error: Cannot redeclare salon_date_hoursbefore()’ is closed to new replies.