Tagged: code, enfold, functions.php, php, woocommerce
-
AuthorPosts
-
July 10, 2018 at 9:24 pm #983834
Hi Guys!
Ive just noticed that most of my custom settings in Function.php are not working? Im not sure how long it has been like this for.. I also notice everytime i try to edit or add anything new to that file i get an error saying it couldnt save.
There are a few things in there that i really need to work, so any ideas?
Thanks!!
July 10, 2018 at 9:58 pm #983871Hey mellypenny,
Please post us your login credentials (in the “private data” field), so we can take a look at your backend.
- Install and activate ” Temporary Login Without Password “.
- Go to ” Users > Temporary Logins ” on the left-side menu.
- Click ” Create New “.
- Add the email address for the account ( you can use (Email address hidden if logged out) ), as well as the ” Role ” making that the highest possible and the expiry about four days
( do be sure that we have enough time to debug ). - Click ” Submit “.
- You’ll now have a temporary account. Please provide us here in the private section the URL, so we can login and help you out.
When your issue is fixed, you can always remove the plugin!
If you prefer to not use the plugin, you can manually create a admin user and post the login credentials in the “private data” field.Best regards,
BasilisJuly 13, 2018 at 12:27 pm #985131Hi Guys!
Sorry for my delayed response, it has been a busy week. Please see below for login credentials..
If you could please take a look at why the function file is not saving and why the codes for “standard postage is not supposed to show when Free Shipping is available” and “”Add to cart button & quantites buttons should dissapear when they are out of stock” (this could be caused by a new plugin i just installed which lets users add themselves to a waitlist if a product is out of stock?
Thankyou sooooo much!
July 17, 2018 at 8:13 pm #986610Hi,
can u please provide FTP Details also?
Best regards,
BasilisJuly 19, 2018 at 4:00 pm #987459Hello, please see below.
Thanks!
July 23, 2018 at 5:29 am #988585Hi,
Thanks for the info.
The button is not displaying when the item is out of stock. (see private field)
Please provide a direct link to an item with “Free Shipping”.Best regards,
IsmaelJuly 23, 2018 at 7:56 am #988598Oh sorry, i meant on variable items.. When an OUT OF STOCK size is chosen it still shows. (see private field below for link)
To see the free shipping + normal shipping in the cart, you would need to add over $75 worth of items to your cart and then go to “view cart” you will then see the choices in the shipping section.
Thanks!!
July 24, 2018 at 11:13 am #989111Hi,
When an OUT OF STOCK size is chosen it still shows. (see private field below for link)
The add to cart button will still display on a variable product even if the variation is out of stock but it won’t be accessible because a notification will display when you click it.
“standard postage is not supposed to show when Free Shipping is available”
We replaced the filter to remove the flat rate when free shipping is available.
/** * Hide shipping rates when free shipping is available * * @param array $rates Array of rates found for the package * @param array $package The package array/object being shipped * @return array of modified rates */ function avf_<a href='https://refer.wordpress.com/r/84/<a href='https://refer.wordpress.com/r/84/woocommerce/' target='_blank' rel="nofollow">woocommerce</a>/' target='_blank' rel="nofollow"><a href='https://refer.wordpress.com/r/84/woocommerce/' target='_blank' rel="nofollow">woocommerce</a></a>_shipping_packages($packages) { $wcshipping = new WC_Shipping; $package = array(); $free = array(); foreach($packages as $key => $package) { foreach ( $wcshipping->load_shipping_methods( $package ) as $shipping_method ) { if ( ! $shipping_method->supports( 'shipping-zones' ) || $shipping_method->get_instance_id() ) { $pkgrates = $shipping_method->get_rates_for_package( $package ); $package['rates'] = $package['rates'] + $pkgrates; // + instead of array_merge maintains numeric keys if(isset($package['rates']['free_shipping:8'])) { unset($package['rates']['flat_rate:6']); } $packages[$key]['rates'] = $package['rates']; } } } return $packages; } add_filter('<a href='https://refer.wordpress.com/r/84/<a href='https://refer.wordpress.com/r/84/woocommerce/' target='_blank' rel="nofollow">woocommerce</a>/' target='_blank' rel="nofollow"><a href='https://refer.wordpress.com/r/84/woocommerce/' target='_blank' rel="nofollow">woocommerce</a></a>_shipping_packages', 'avf_<a href='https://refer.wordpress.com/r/84/<a href='https://refer.wordpress.com/r/84/woocommerce/' target='_blank' rel="nofollow">woocommerce</a>/' target='_blank' rel="nofollow"><a href='https://refer.wordpress.com/r/84/woocommerce/' target='_blank' rel="nofollow">woocommerce</a></a>_shipping_packages', 10, 1);
Best regards,
Ismael -
AuthorPosts
- You must be logged in to reply to this topic.