Title: Site down
Last modified: September 27, 2016

---

# Site down

 *  [Yiannis Iliopoulos](https://wordpress.org/support/users/savoures/)
 * (@savoures)
 * [9 years, 7 months ago](https://wordpress.org/support/topic/site-down-53/)
 * Hello
    I installed the plugin and everything was fine without code. when i paste
   the code that i already use in my functions.php without a problem when i click
   save the site goes blank the only way to restore it is to delete the plugin folder
   why does it do that ? the code as i said works ok when inserted directly in the
   functions.php file
 * the functions are:
 * <?php
    /** * [@package](https://wordpress.org/support/users/package/) Gusto *
   [@author](https://wordpress.org/support/users/author/) YOOtheme [http://www.yootheme.com](http://www.yootheme.com)*
   [@copyright](https://wordpress.org/support/users/copyright/) Copyright (C) YOOtheme
   GmbH * [@license](https://wordpress.org/support/users/license/) [http://www.gnu.org/licenses/gpl.html](http://www.gnu.org/licenses/gpl.html)
   GNU/GPL */
 * // check compatibility
    if (version_compare(PHP_VERSION, ‘5.3’, ‘>=’)) {
 *  // bootstrap warp
    require(__DIR__.’/warp.php’); }
 * // Add php support in text widget
 * function php_execute($html){
    if(strpos($html,”<“.”?php”)!==false){ ob_start();
   eval(“?”.”>”.$html); $html=ob_get_contents(); ob_end_clean(); } return $html;}
   add_filter(‘widget_text’,’php_execute’,100);
 * // remove SKU
    add_filter( ‘wc_product_sku_enabled’, ‘__return_false’ );
 * // Change the shop / product prices if a unit_price is set
    function sv_change_product_html(
   $price_html, $product ) {
 *  $unit_price = get_post_meta( $product->id, ‘unit_price’, true );
 *  if ( ! empty( $unit_price ) ) {
    $price_html = ‘<span class=”amount”>’ . wc_price(
   $unit_price ) . ‘ / kg</span>’; }
 *  return $price_html;
    } add_filter( ‘woocommerce_get_price_html’, ‘sv_change_product_html’,
   10, 2 );
 * // Change the cart prices if a unit_price is set
    function sv_change_product_price_cart(
   $price, $cart_item, $cart_item_key ) {
 *  $unit_price = get_post_meta( $cart_item[‘product_id’], ‘unit_price’, true );
 *  if ( ! empty( $unit_price ) ) {
    $price = wc_price( $unit_price ) . ‘ / kg’;}
 *  return $price;
    } add_filter( ‘woocommerce_cart_item_price’, ‘sv_change_product_price_cart’,
   10, 3 );
 * // Change select options button text
    add_filter( ‘woocommerce_product_add_to_cart_text’,‘
   custom_woocommerce_product_add_to_cart_text’ ); function custom_woocommerce_product_add_to_cart_text(){
   global $product; $product_type = $product->product_type; switch ( $product_type){
   case ‘variable’: return __( ‘Δείτε περισσότερα’, ‘woocommerce’ ); break; } }
 * // Removes showing results
 * remove_action( ‘woocommerce_before_shop_loop’, ‘woocommerce_result_count’, 20);
 * //Reposition WooCommerce breadcrumb
    function woocommerce_remove_breadcrumb(){
   remove_action( ‘woocommerce_before_main_content’, ‘woocommerce_breadcrumb’, 20);}
   add_action( ‘woocommerce_before_main_content’, ‘woocommerce_remove_breadcrumb’);
 * function woocommerce_custom_breadcrumb(){
    woocommerce_breadcrumb(); }
 * add_action( ‘woo_custom_breadcrumb’, ‘woocommerce_custom_breadcrumb’ );
 * // Change add to cart name
    add_filter( ‘woocommerce_product_single_add_to_cart_text’,‘
   woo_custom_cart_button_text’ ); // 2.1 +
 * function woo_custom_cart_button_text() {
 *  return __( ‘Προσθέστε στο καλάθι’, ‘woocommerce’ );
 * }
 * //product description under image
    remove_action( ‘woocommerce_after_single_product_summary’,‘
   woocommerce_output_product_data_tabs’, 10 ); add_action( ‘woocommerce_product_thumbnails’,‘
   woocommerce_output_product_data_tabs’, 10 );
 * // product name
    add_filter(‘woocommerce_product_description_heading’, ‘isa_product_description_heading’);
 * function isa_product_description_heading() {
    return __(‘Περιγραφή προϊόντος’,‘
   woocommerce’); }
 * //custom image
    add_filter(‘woocommerce_product_meta_end’,’xasapis_logo’); function
   xasapis_logo() { echo “⌊Kreopoleiotapaidia⌉“; }
 * //add back to store button after cart
    add_action(‘woocommerce_before_cart_totals’,‘
   themeprefix_back_to_store’); function themeprefix_back_to_store() { ?> “><?php
   _e( ‘Συνέχεια αγορών’, ‘woocommerce’ ) ?> <?php }
 * //Remove coupon from checkout page
    remove_action( ‘woocommerce_before_checkout_form’,‘
   woocommerce_checkout_coupon_form’, 10 );
 * // Remove and sort fields from checkout page
 * // Move – ReOrder Fields @ WooCommerce Checkout Page
 * add_filter( ‘woocommerce_checkout_fields’, ‘bbloomer_move_checkout_fields’ );
 * function bbloomer_move_checkout_fields( $fields ) {
 *  // Billing: move these around in the order you’d like
 *  $fields2[‘billing’][‘billing_first_name’] = $fields[‘billing’][‘billing_first_name’];
   
   $fields2[‘billing’][‘billing_last_name’] = $fields[‘billing’][‘billing_last_name’];
   $fields2[‘billing’][‘billing_phone’] = $fields[‘billing’][‘billing_phone’]; $
   fields2[‘billing’][‘billing_address_1’] = $fields[‘billing’][‘billing_address_1’];
   $fields2[‘billing’][‘billing_address_2’] = $fields[‘billing’][‘billing_address_2’];
   $fields2[‘billing’][‘billing_email’] = $fields[‘billing’][‘billing_email’]; $
   fields2[‘billing’][‘billing_postcode’] = $fields[‘billing’][‘billing_postcode’];
   $fields2[‘billing’][‘billing_city’] = $fields[‘billing’][‘billing_city’];
 * // $fields2[‘billing’][‘billing_company’] = $fields[‘billing’][‘billing_company’];
 *  // Shipping: move these around in the order you’d like
 *  $fields2[‘shipping’][‘shipping_first_name’] = $fields[‘shipping’][‘shipping_first_name’];
   
   $fields2[‘shipping’][‘shipping_last_name’] = $fields[‘shipping’][‘shipping_last_name’];
   $fields2[‘shipping’][‘shipping_address_1’] = $fields[‘shipping’][‘shipping_address_1’];
   $fields2[‘shipping’][‘shipping_company’] = $fields[‘shipping’][‘shipping_company’];
 *  $fields2[‘shipping’][‘shipping_address_2’] = $fields[‘shipping’][‘shipping_address_2’];
   
   $fields2[‘shipping’][‘shipping_city’] = $fields[‘shipping’][‘shipping_city’];
   $fields2[‘shipping’][‘shipping_postcode’] = $fields[‘shipping’][‘shipping_postcode’];
   $fields2[‘shipping’][‘shipping_state’] = $fields[‘shipping’][‘shipping_state’];
   $fields2[‘shipping’][‘shipping_country’] = $fields[‘shipping’][‘shipping_country’];
   $fields2[‘order’][‘order_comments’] = $fields[‘order’][‘order_comments’];
 *  // Add full width Classes and Clears to Adjustments
    $fields2[‘billing’][‘billing_first_name’]
   = array( ‘label’ => __(‘Όνομα’, ‘woocommerce’), ‘placeholder’ => __(”, ‘placeholder’,‘
   woocommerce’), ‘required’ => true, ‘class’ => array(‘form-row-first’), ‘clear’
   => true ); $fields2[‘billing’][‘billing_last_name’] = array( ‘label’ => __(‘Επίθετο’,‘
   woocommerce’), ‘placeholder’ => __(”, ‘placeholder’, ‘woocommerce’), ‘required’
   => true, ‘class’ => array(‘form-row-last’), ‘clear’ => true ); $fields2[‘billing’][‘
   billing_email’] = array( ‘label’ => __(‘Email’, ‘woocommerce’), ‘placeholder’
   => __(”, ‘placeholder’, ‘woocommerce’), ‘required’ => true, ‘class’ => array(‘
   form-row-wide’), ‘clear’ => true ); $fields2[‘billing’][‘billing_phone’] = array(‘
   label’ => __(‘Τηλέφωνο’, ‘woocommerce’), ‘placeholder’ => __(”, ‘placeholder’,‘
   woocommerce’), ‘required’ => true, ‘class’ => array(‘form-row-first’), ‘clear’
   => true ); $fields2[‘billing’][‘billing_address_1’] = array( ‘label’ => __(‘Διεύθυνση’,‘
   woocommerce’), ‘placeholder’ => __(”, ‘placeholder’, ‘woocommerce’), ‘required’
   => true, ‘class’ => array(‘form-row-last’), ‘clear’ => true ); $fields2[‘billing’][‘
   billing_address_2’] = array( ‘label’ => __(‘Όροφος’, ‘woocommerce’), ‘placeholder’
   => __(‘Σε ποιόν όροφο μένετε’, ‘placeholder’, ‘woocommerce’), ‘required’ => false,‘
   class’ => array(‘form-row-first’), ‘clear’ => true ); $fields2[‘billing’][‘billing_email’]
   = array( ‘label’ => __(‘Email’, ‘woocommerce’), ‘placeholder’ => __(”, ‘placeholder’,‘
   woocommerce’), ‘required’ => false, ‘class’ => array(‘form-row-last’), ‘clear’
   => true ); $fields2[‘billing’][‘billing_postcode’] = array( ‘label’ => __(‘Τ.
   Κ.’, ‘woocommerce’), ‘placeholder’ => __(”, ‘placeholder’, ‘woocommerce’), ‘required’
   => true, ‘class’ => array(‘form-row-first’), ‘clear’ => true ); $fields2[‘billing’][‘
   billing_city’] = array( ‘label’ => __(‘Πόλη’, ‘woocommerce’), ‘placeholder’ =
   > __(”, ‘placeholder’, ‘woocommerce’), ‘required’ => true, ‘class’ => array(‘
   form-row-last’), ‘clear’ => true ); $fields2[‘order’][‘order_comments’] = array(‘
   label’ => __(‘Σημειώσεις για την παραγγελία σας’, ‘woocommerce’), ‘placeholder’
   => __(‘Π.χ. θα ήθελα να μου τα στείλετε μετά τις 14:00 ή θα ήθελα να χωρίσετε
   τον κιμά στη μέση ή φιλεταρισμένο το κοτόπουλο’, ‘placeholder’, ‘woocommerce’),‘
   required’ => false, ‘class’ => array(‘notes woocommerce-validated’), ‘clear’ 
   => true, ‘type’ => ‘textarea’ );
 *  return $fields2;
    }
 * // add checkout payment title
    add_action( ‘woocommerce_review_order_before_payment’,‘
   add_title_payment’, 20 ); function add_title_payment(){ echo “<h3 class=’title-
   payment’>Τρόπος πληρωμής</h3>”; }
 * // change place order text
    /** * Change Proceed to Checkout text in WooCommerce
   via text replacement * */ add_filter( ‘gettext’, ‘ld_custom_checkout_button_text’,
   20, 3 ); function ld_custom_checkout_button_text( $translated_text, $text, $domain){
   switch ( $translated_text ) { case ‘Place order’ : $translated_text = __( ‘Αποστολή
   παραγγελίας’, ‘woocommerce’ ); break;
 *  case ‘Apply Coupon’ :
    $translated_text = __( ‘Εξαργύρωση κουπονιού’, ‘woocommerce’);
   break;
 *  case ‘Coupon code’ :
    $translated_text = __( ‘Κωδικός κουπονιού’, ‘woocommerce’);
   break;
 *  case ‘Update Cart’ :
    $translated_text = __( ‘Ανανέωση καλαθιού’, ‘woocommerce’);
   break;
 *  case ‘Proceed to Checkout’ :
    $translated_text = __( ‘Προχωρήστε σε παραγγελία’,‘
   woocommerce’ ); break;
 *  }
    return $translated_text; }
 * /**
    * Change text strings * * [@link](https://wordpress.org/support/users/link/)
   [http://codex.wordpress.org/Plugin_API/Filter_Reference/gettext](http://codex.wordpress.org/Plugin_API/Filter_Reference/gettext)*/
   function my_text_strings( $translated_text, $text, $domain ) { switch ( $translated_text){
   case ‘Coupon’ : $translated_text = __( ‘Discount Code’, ‘woocommerce’ ); break;
   case ‘Apply Coupon’ : $translated_text = __( ‘Apply Code’, ‘woocommerce’ ); break;}
   return $translated_text; } add_filter( ‘gettext’, ‘my_text_strings’, 20, 3 );
 * /**
    * WooCommerce Extra Feature * ————————– * * Change number of related products
   on product page * Set your own value for ‘posts_per_page’ * */ function woo_related_products_limit(){
   global $product;
 *  $args[‘posts_per_page’] = 6;
    return $args; } add_filter( ‘woocommerce_output_related_products_args’,‘
   jk_related_products_args’ ); function jk_related_products_args( $args ) { $args[‘
   posts_per_page’] = 3; // 3 related products $args[‘columns’] = 2; // arranged
   in 2 columns return $args; }

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

 *  Thread Starter [Yiannis Iliopoulos](https://wordpress.org/support/users/savoures/)
 * (@savoures)
 * [9 years, 6 months ago](https://wordpress.org/support/topic/site-down-53/#post-8427518)
 * Helloooo
    is anyone going to help me ??
 *  [mycustomsoftware](https://wordpress.org/support/users/mycustomsoftware/)
 * (@mycustomsoftware)
 * [9 years, 3 months ago](https://wordpress.org/support/topic/site-down-53/#post-8732353)
 * You have <?php 3 times in your code. It can only be there once or it will cause
   a fatal error.

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

The topic ‘Site down’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/my-custom-functions_0e1030.svg)
 * [My Custom Functions](https://wordpress.org/plugins/my-custom-functions/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/my-custom-functions/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/my-custom-functions/)
 * [Active Topics](https://wordpress.org/support/plugin/my-custom-functions/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/my-custom-functions/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/my-custom-functions/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [mycustomsoftware](https://wordpress.org/support/users/mycustomsoftware/)
 * Last activity: [9 years, 3 months ago](https://wordpress.org/support/topic/site-down-53/#post-8732353)
 * Status: not resolved