Title: PHP code not working after update
Last modified: October 2, 2016

---

# PHP code not working after update

 *  Resolved [Niels Tieman](https://wordpress.org/support/users/niels-tieman/)
 * (@niels-tieman)
 * [9 years, 8 months ago](https://wordpress.org/support/topic/php-code-not-working-after-update/)
 * Hi,
 * I downloaded the update tonight and update-ted to the new PHP code. After that,
   and with the old code, it wouldn’t display anything. The WP shortcode is working
   in a post I tested, but the PHP code doesn’t seem to work correctly (or I’ve 
   done something wrong.)
 * The code used: <?php do_shortcode(‘[mbhi location=”atoriana”]’) ?>

Viewing 4 replies - 1 through 4 (of 4 total)

 *  Plugin Author [Wombat Plugins](https://wordpress.org/support/users/maartenbelmans/)
 * (@maartenbelmans)
 * [9 years, 8 months ago](https://wordpress.org/support/topic/php-code-not-working-after-update/#post-8245502)
 * Hi Niels,
 * Thanks for reporting this. It’s fixed but you’ll have to update to version 1.7.1
   🙂
 * Sorry for the inconvenience!
 * Maarten
 *  Thread Starter [Niels Tieman](https://wordpress.org/support/users/niels-tieman/)
 * (@niels-tieman)
 * [9 years, 8 months ago](https://wordpress.org/support/topic/php-code-not-working-after-update/#post-8246410)
 * Hi Maarten,
 * I have update-ted it once again and the newest update is working like a charm.
 * Thanks for the quick update.
 * Niels
 *  [JProffitt3G](https://wordpress.org/support/users/jproffitt3g/)
 * (@jproffitt3g)
 * [9 years, 7 months ago](https://wordpress.org/support/topic/php-code-not-working-after-update/#post-8255721)
 * Hello Niels, Maarten, I think this is intended WordPress behavior. `do_shortcode`
   does not **echo** html, it only **returns** it. You have to echo it yourself.
   See documentation on example usage: [https://developer.wordpress.org/reference/functions/do_shortcode/](https://developer.wordpress.org/reference/functions/do_shortcode/)
 * If you modified the code to be `<?php echo do_shortcode(‘[mbhi location=”atoriana”]’)?
   >` it should work properly. Before the 1.7.0 update, this plugin had a bug where
   it echoed the html and returned nothing, but that is a bug and not a feature.
   So you have two wrongs making a right here.
 * You can make that modification and it’ll work both before and after the bug is
   fixed.
 * If this is the issue then I propose the fix be reimplemented in 1.7.2.
 *  Thread Starter [Niels Tieman](https://wordpress.org/support/users/niels-tieman/)
 * (@niels-tieman)
 * [9 years, 7 months ago](https://wordpress.org/support/topic/php-code-not-working-after-update/#post-8259394)
 * Hello!
 * I used your echo code on the new 1.7.2 update and that works for the mbhi and
   mbhi_hours.

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘PHP code not working after update’ is closed to new replies.

 * ![](https://ps.w.org/business-hours-indicator/assets/icon-256x256.png?rev=1551528)
 * [Business Hours Indicator](https://wordpress.org/plugins/business-hours-indicator/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/business-hours-indicator/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/business-hours-indicator/)
 * [Active Topics](https://wordpress.org/support/plugin/business-hours-indicator/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/business-hours-indicator/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/business-hours-indicator/reviews/)

 * 4 replies
 * 3 participants
 * Last reply from: [Niels Tieman](https://wordpress.org/support/users/niels-tieman/)
 * Last activity: [9 years, 7 months ago](https://wordpress.org/support/topic/php-code-not-working-after-update/#post-8259394)
 * Status: resolved