App Store Assistant
[resolved] Fatal Error "Cannot redeclare format_price()" on upgrade to Version 6.3.1 (3 posts)

  1. kokopelli
    Posted 3 years ago #

    I'm using WordPress 3.6. and just tried to upgrade to Version 6.3.1 of your plugin, but got this fatal error:
    Cannot redeclare format_price() (previously declared in /home/mysite/public_html/wp-content/themes/wp_penelope/panel/generic.php:566) in /home/mysite/public_html/wp-content/plugins/app-store-assistant/includes/app-store-functions.php on line 462

    It appears there's a conflict with the ecommerce theme I'm using (cssigniter.com/ignite/themes/penelope/), due to both your plugin and the theme using "format_price()".

    Is it possible that you can perhaps uniquely rename your price function in your plugin, so as not to cause this kind of conflict? I'm sure others will run into a similar issue. Maybe, "appStore_format_price()" (similar to your other calls), instead of just "format_price()"?

    As a workaround, I renamed the function call in my theme, since I'm not using its ecommerce features on my site, and it seems to have worked. I was able to upgrade and activate your plugin this way.

    Thanks for a great plugin!


  2. SEALsystems
    Plugin Author

    Posted 3 years ago #

    Will do. Version 6.3.2 will fix the issue. If you want to make the changes while you wait, here are the line numbers to change:

    571: 			$TheAppPrice = appStore_format_price($appData->price);
    432: function appStore_format_price($unformattedPrice) {
    533: 	$app->TheAppPrice = appStore_format_price($app->price);
    813: 	$iTunesPrice = appStore_format_price($unformattedPrice);
    903: 	$app->TheAppPrice = appStore_format_price($app->price);
  3. kokopelli
    Posted 3 years ago #

    Sounds great, will do. Thanks for the prompt response!

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • App Store Assistant
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic