Title: eggrace's Replies | WordPress.org

---

# eggrace

  [  ](https://wordpress.org/support/users/eggrace/)

 *   [Profile](https://wordpress.org/support/users/eggrace/)
 *   [Topics Started](https://wordpress.org/support/users/eggrace/topics/)
 *   [Replies Created](https://wordpress.org/support/users/eggrace/replies/)
 *   [Reviews Written](https://wordpress.org/support/users/eggrace/reviews/)
 *   [Topics Replied To](https://wordpress.org/support/users/eggrace/replied-to/)
 *   [Engagements](https://wordpress.org/support/users/eggrace/engagements/)
 *   [Favorites](https://wordpress.org/support/users/eggrace/favorites/)

 Search replies:

## Forum Replies Created

Viewing 15 replies - 1 through 15 (of 31 total)

1 [2](https://wordpress.org/support/users/eggrace/replies/page/2/?output_format=md)
[3](https://wordpress.org/support/users/eggrace/replies/page/3/?output_format=md)
[→](https://wordpress.org/support/users/eggrace/replies/page/2/?output_format=md)

 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Woocommerce Account Fields](https://wordpress.org/support/topic/woocommerce-account-fields/)
 *  Thread Starter [eggrace](https://wordpress.org/support/users/eggrace/)
 * (@eggrace)
 * [4 years, 3 months ago](https://wordpress.org/support/topic/woocommerce-account-fields/#post-15270825)
 * Thank you
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[WooCommerce] Checkout Address Fields](https://wordpress.org/support/topic/checkout-address-fields/)
 *  Thread Starter [eggrace](https://wordpress.org/support/users/eggrace/)
 * (@eggrace)
 * [4 years, 3 months ago](https://wordpress.org/support/topic/checkout-address-fields/#post-15270823)
 * Thank you
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[WooCommerce] Only running a script for a particular role](https://wordpress.org/support/topic/only-running-a-script-for-a-particular-role/)
 *  Thread Starter [eggrace](https://wordpress.org/support/users/eggrace/)
 * (@eggrace)
 * [6 years, 4 months ago](https://wordpress.org/support/topic/only-running-a-script-for-a-particular-role/#post-12322091)
 * This worked!
    Thank you so much for your time and experience. Cheers
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[WooCommerce] Only running a script for a particular role](https://wordpress.org/support/topic/only-running-a-script-for-a-particular-role/)
 *  Thread Starter [eggrace](https://wordpress.org/support/users/eggrace/)
 * (@eggrace)
 * [6 years, 4 months ago](https://wordpress.org/support/topic/only-running-a-script-for-a-particular-role/#post-12320134)
 * Thank you so much, this has worked and I can see what is now the problem.
    A 
   non logged in visitor is not a ‘customer’ but they can still order. But i cannot
   find anywhere what role is assigned to a site visitor. Is there default that 
   you know of? Thank you
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[WooCommerce] Only running a script for a particular role](https://wordpress.org/support/topic/only-running-a-script-for-a-particular-role/)
 *  Thread Starter [eggrace](https://wordpress.org/support/users/eggrace/)
 * (@eggrace)
 * [6 years, 4 months ago](https://wordpress.org/support/topic/only-running-a-script-for-a-particular-role/#post-12319569)
 * I feel so bad for taking up your time and thank you for your assistance.
    Unfortunately
   it still works for all roles. Am I right in thinking that ‘customer’ is a standard
   WordPress role and I am not doing anything silly?
 * Run script for ‘customer’
    or Not run script for ‘wholesale_buyer’ and ‘wholesale_tax_free’
 * Maybe it needs an exception rather than an inclusion?
 * Sorry for the problems and thank you
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[WooCommerce] Only running a script for a particular role](https://wordpress.org/support/topic/only-running-a-script-for-a-particular-role/)
 *  Thread Starter [eggrace](https://wordpress.org/support/users/eggrace/)
 * (@eggrace)
 * [6 years, 4 months ago](https://wordpress.org/support/topic/only-running-a-script-for-a-particular-role/#post-12318995)
 * Thank you so much for your assistance.
 * Below is the full code:
 * // Check current user role
    $user = wp_get_current_user(); $roles = ( array )
   $user->roles;
 * if ( in_array( ‘customer’, $roles ) ) {
 * // Set a minimum number of products requirement before checking out
    add_action(‘
   woocommerce_check_cart_items’, ‘spyr_set_min_num_products’ ); function spyr_set_min_num_products(){
 * // Only run in the Cart or Checkout pages
    if( is_cart() || is_checkout() ) {
   global $woocommerce;
 *  // Set the minimum number of products before checking out
    $minimum_num_products
   = 24; // Get the Cart’s total number of products $cart_num_products = WC()->cart-
   >cart_contents_count;
 *  // Compare values and add an error is Cart’s total number of products
    // happens
   to be less than the minimum required before checking out. // Will display a message
   along the lines of // A Minimum of 20 products is required before checking out.(
   Cont. below) // Current number of items in the cart: 6 if( $cart_num_products
   < $minimum_num_products ) { wc_add_notice( sprintf( ‘**We sell bottles in packs
   of %s.**‘ . ‘<br />Current number of items in the cart: %s.’, $minimum_num_products,
   $cart_num_products ), ‘error’ ); } } } }
 * Unfortunately this does not run at all now regardless of the user role.
 * I am a bit of a notice.
    I have set default site visitor and accounts as ‘Customer’
   role type. I also manually set up 2 wholesale account types.
 * I only want the above script to run on the default ‘customers’; i don’t want 
   it to run for my wholesale accounts.
 * Am I going about this the right way?
 * Many thanks for your help
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[WooCommerce] Product Tabs on Mobile](https://wordpress.org/support/topic/product-tabs-on-mobile/)
 *  Thread Starter [eggrace](https://wordpress.org/support/users/eggrace/)
 * (@eggrace)
 * [6 years, 11 months ago](https://wordpress.org/support/topic/product-tabs-on-mobile/#post-11574433)
 * Thank you for your kind followup.
    Yes it was some CSS messing it up. Although
   I have yet to find a way to put a page title on the single product page. Many
   thanks Elliot
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[WP STAGING - WordPress Backup, Restore & Migration] Clarify migration process for free WP Staging plugin](https://wordpress.org/support/topic/clarify-migration-process-for-free-wp-staging-plugin/)
 *  [eggrace](https://wordpress.org/support/users/eggrace/)
 * (@eggrace)
 * [6 years, 12 months ago](https://wordpress.org/support/topic/clarify-migration-process-for-free-wp-staging-plugin/#post-11542203)
 * Thank you Rene,
    I will have another go with your suggestions.
 * I deleted the files based on this response you gave to a previous member:
 * ‘in the documentation for using the free version it’s mentioned to overwrite 
   all of them but when it comes to the plugins it’s better if you delete the old
   plugins or rename the plugin folder and then to copy the staging plugins folder
   to live.’
 * I must misinterpret. Does overwrite mean replace the content within each file?
   Or copy the file and add to the wp_content folder alongside the live site folders?
 * Many thanks
    Elliot
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[WP STAGING - WordPress Backup, Restore & Migration] Clarify migration process for free WP Staging plugin](https://wordpress.org/support/topic/clarify-migration-process-for-free-wp-staging-plugin/)
 *  [eggrace](https://wordpress.org/support/users/eggrace/)
 * (@eggrace)
 * [7 years ago](https://wordpress.org/support/topic/clarify-migration-process-for-free-wp-staging-plugin/#post-11541283)
 * As a follow up to my last post.
 * The final process says:
 * The last step is to tell the WordPress live site to use the database tables of
   the staging site.
 * For this, you need an FTP account to access your website and an FTP client. I
   recommend the use of filezilla. It’s entirely free and open source.
 * Login to your website with the FTP program and open the config file of your live
   site:
 * wp-config.php
    Open the file in edit mode by opening the context menu with the
   right mouse button and select edit
 * Use FTP again and open the config file wp-config.php of your live site.
    The 
   file is located in /path_to_wordpress/wp-config.php Change the value of $table_prefix
   to the same value that is used by the staging site, e.g.
 * This suggests 2 wp-config.php processes. However if I cam reading it correclty
   it is the same process both on the Live site. So i don’t know why I am being 
   asked to open it twice.
 * Many thanks for your assitance.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[WP STAGING - WordPress Backup, Restore & Migration] Clarify migration process for free WP Staging plugin](https://wordpress.org/support/topic/clarify-migration-process-for-free-wp-staging-plugin/)
 *  [eggrace](https://wordpress.org/support/users/eggrace/)
 * (@eggrace)
 * [7 years ago](https://wordpress.org/support/topic/clarify-migration-process-for-free-wp-staging-plugin/#post-11541269)
 * Hi,
    I am using the free version and think its great. However, I am struggling
   to push it live via the manual procress. I am responding to this thread because
   it relates to the first process which for me is still not clear. Above you say‘
   it’s mentioned to overwrite…’
 * However the manual i can see on my version (updated) says:
    2. Step – Copy Files
   Use an FTP program like Filezilla and copy over the folders wp-content/uploads,
   wp-content/plugins and wp-content/themes from your staging site subfolder to 
   the production site.
 * And not further explantion. So I don’t know if I cam doing it correctly.
    FYI:
   I have copied staging folders into live site. And delated live site folders.
 * At the end of the process; when i get to check the ‘new’ live site I get told
   to reinstall WP.
 * I have surely made a mistake in the process but I am not sure where.
    Can you
   help? Thank you
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[WooCommerce] Adding a page title to a product page](https://wordpress.org/support/topic/adding-a-page-title-to-a-product-page/)
 *  Thread Starter [eggrace](https://wordpress.org/support/users/eggrace/)
 * (@eggrace)
 * [7 years ago](https://wordpress.org/support/topic/adding-a-page-title-to-a-product-page/page/2/#post-11532428)
 * Ah ok, sorry i’ve taken enough time and it’s late for you.
    I will try to find/
   add a hook. All the best and thanks
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[WooCommerce] Adding a page title to a product page](https://wordpress.org/support/topic/adding-a-page-title-to-a-product-page/)
 *  Thread Starter [eggrace](https://wordpress.org/support/users/eggrace/)
 * (@eggrace)
 * [7 years ago](https://wordpress.org/support/topic/adding-a-page-title-to-a-product-page/page/2/#post-11532407)
 * Thanks.
    Under the breadcrumb top left, same as your very first screenshot
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[WooCommerce] Adding a page title to a product page](https://wordpress.org/support/topic/adding-a-page-title-to-a-product-page/)
 *  Thread Starter [eggrace](https://wordpress.org/support/users/eggrace/)
 * (@eggrace)
 * [7 years ago](https://wordpress.org/support/topic/adding-a-page-title-to-a-product-page/page/2/#post-11532400)
 * Ok thank you, I will keep trying. I just can;t get it top left of the page.
    
   Thank you for you help. Cheers have a good evening
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[WooCommerce] Adding a page title to a product page](https://wordpress.org/support/topic/adding-a-page-title-to-a-product-page/)
 *  Thread Starter [eggrace](https://wordpress.org/support/users/eggrace/)
 * (@eggrace)
 * [7 years ago](https://wordpress.org/support/topic/adding-a-page-title-to-a-product-page/page/2/#post-11532385)
 * I am so sorry for taking your time so much but it is raining here and the internet
   gets slow.
    I think you sent some margin code? But I can’t find it
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[WooCommerce] Adding a page title to a product page](https://wordpress.org/support/topic/adding-a-page-title-to-a-product-page/)
 *  Thread Starter [eggrace](https://wordpress.org/support/users/eggrace/)
 * (@eggrace)
 * [7 years ago](https://wordpress.org/support/topic/adding-a-page-title-to-a-product-page/page/2/#post-11532375)
 * Sorry I didn’t get your screenshot

Viewing 15 replies - 1 through 15 (of 31 total)

1 [2](https://wordpress.org/support/users/eggrace/replies/page/2/?output_format=md)
[3](https://wordpress.org/support/users/eggrace/replies/page/3/?output_format=md)
[→](https://wordpress.org/support/users/eggrace/replies/page/2/?output_format=md)