Title: Php Functions Issue
Last modified: July 28, 2020

---

# Php Functions Issue

 *  [magicalandmystical](https://wordpress.org/support/users/magicalandmystical/)
 * (@magicalandmystical)
 * [5 years, 10 months ago](https://wordpress.org/support/topic/php-functions-issue/)
 * I’m sorry I’m not the best with PHP at all.
 * Trying to get this to work but I seem to have something wrong?
 * Can aNybody help with what I am missing?
 *     ```
       function cegg_savings() { ?>
   
       <?php if ($perc_difference && $min_price_item['domain'] != $max_price_item['domain']): ?>, <?php echo sprintf(__('which is %s%% less than the cost in %s (%s).', 'content-egg-tpl'), $perc_difference, $shops_list[$max_price_item['domain']], TemplateHelper::formatPriceCurrency($max_price_item['price'], $max_price_item['currencyCode'])); ?>
   
         <?php
         }
   
       add_action( 'woocommerce_single_product_summary', 'cegg_savings', 10 );
       ```
   
    -  This topic was modified 5 years, 10 months ago by [Jan Dembowski](https://wordpress.org/support/users/jdembowski/).

Viewing 1 replies (of 1 total)

 *  [Joy](https://wordpress.org/support/users/joyously/)
 * (@joyously)
 * [5 years, 10 months ago](https://wordpress.org/support/topic/php-functions-issue/#post-13180937)
 * It might help if you explain what you are trying to do or what error you are 
   getting, but you should do it at the support forum for the plugin you are using.
   I can’t tell if that’s Woocommerce itself or some other plugin that adds functionality
   to it.

Viewing 1 replies (of 1 total)

The topic ‘Php Functions Issue’ is closed to new replies.

## Tags

 * [functions](https://wordpress.org/support/topic-tag/functions/)
 * [php](https://wordpress.org/support/topic-tag/php/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 1 reply
 * 2 participants
 * Last reply from: [Joy](https://wordpress.org/support/users/joyously/)
 * Last activity: [5 years, 10 months ago](https://wordpress.org/support/topic/php-functions-issue/#post-13180937)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
