Joel Eade
Forum Replies Created
-
You are my hero, @12steprecovery! You’ve just saved me minutes of not hours of trial and error. Can I send you some money?! Seriously ?? Thanks mate.
Forum: Plugins
In reply to: [Breadcrumb] Remove WooCommerce breadcrumb from ONE page (shop)I had to change the action to load in wp_head for it to hide the breadcrumbs for my theme. Here’s my code:
function remove_woocommerce_breadcrumbs() { if (is_shop()) { remove_action( 'woocommerce_before_main_content', 'woocommerce_breadcrumb', 20, 0 ); } } add_action( 'wp_head', 'remove_woocommerce_breadcrumbs' );
I had the same issue as well. The core team are working on it: https://core.trac.www.ads-software.com/ticket/39132
Forum: Plugins
In reply to: [Jetpack - WP Security, Backup, Speed, & Growth] Getting Fatal Error MessageI couldn’t access the WordPress admin to run the update so I:
- renamed the jetpack folder to be _jetpack via FTP in order to deactivate the plugin
- logged into the WordPress admin and went to Plugins
- ran the Jetpack 4.0.2 update
- refreshed the Plugins page (so it could find the folder renamed from _jetpack to jetpack as part of the update process)
- activated Jetpack
Cheers!
Forum: Plugins
In reply to: [Login With Ajax - Fast Logins, 2FA, Redirects] Customise Status MessagesFantastic! Thanks mate ??
Ah, I must apologise. I didn’t realise this thread was for a specific plugin. I thought I was on the WooCommerce forum.
My comments may not be relevant to this plugin. Sorry for any confusion.
Hey @sapnafoods,
It was in my functions.php file in my theme folder.
I’d added it to my functions.php file months ago without it causing a problem. The WooCommerce update must have introduced a conflict with the filter, so in my case commenting out
unset($fields['billing']['billing_country']);
andunset($fields['shipping']['shipping_country']);
resolved the issue.I noticed that you can no longer choose to hide the “Country” field, unless I’m not looking hard enough. Perhaps that’s somehow related.
Cheers,
Joel
I had the shipping & billing country fields unset in my functions.php file and was getting the error:
State is not valid. Please enter one of the following: Array, Array, Array, Array, Array, Array, Array, Array, Array, Array, Array, Array, Array, Array, Array, Array, Array, Array, Array, Array, Array, Array, Array, Array
State is not valid. Please enter one of the following: Array, Array, Array, Array, Array, Array, Array, Array, Array, Array, Array, Array, Array, Array, Array, Array, Array, Array, Array, Array, Array, Array, Array, Array
Removing/commenting out the below code fixed my issue:
add_filter( 'woocommerce_checkout_fields' , 'custom_override_checkout_fields' ); // Our hooked in function - $fields is passed via the filter! function custom_override_checkout_fields( $fields ) { unset($fields['billing']['billing_country']); unset($fields['shipping']['shipping_country']); return $fields; }
Forum: Plugins
In reply to: [Appointments] Customising the appointment confirmationDuh, just found it in the “Shortcodes” help doc. Sorry!
Thanks!
Forum: Plugins
In reply to: [WooCommerce] archive-product.php template overwrite not working.Thanks @nikasama83. I’ve taken on a project using a non-WooThemes theme and had the same problem. This snippet has got me back on track.
Cheers!
Forum: Plugins
In reply to: [WooCommerce] How to change Add to Cart button to a Read More button?Awesome work, @agrolsy. I’ll update my code. Cheers!
Forum: Plugins
In reply to: [WooCommerce] How to change Add to Cart button to a Read More button?Sorry, @tozix. I don’t know the answer to that one.
Forum: Plugins
In reply to: [WooCommerce] How to change Add to Cart button to a Read More button?Yes, that works too. Nice, although you lose the <button> element.
I’ve changed mine to use some of your code:
add_action( 'woocommerce_after_shop_loop_item', 'my_woocommerce_template_loop_add_to_cart', 10 ); function my_woocommerce_template_loop_add_to_cart() { global $product; echo '<form action="' . esc_url( $product->get_permalink( $product->id ) ) . '" method="get"> <button type="submit" class="single_add_to_cart_button button alt">View More</button> </form>'; }
Thanks!
Forum: Plugins
In reply to: [WooCommerce] How to change Add to Cart button to a Read More button?Hi All,
The below code works for me using WordPress 3.8.1 and WooCommerce 2.1.2. It will replace the “Add to Cart” button for Simple products on the Shop (product list) page with a “Read more” button that links to the single product page.
In functions.php add the below code to remove the “Add to Cart” button:
remove_action( 'woocommerce_after_shop_loop_item', 'woocommerce_template_loop_add_to_cart', 10 );
Now, add this code to create your own button:
add_action( 'woocommerce_after_shop_loop_item', 'my_woocommerce_template_loop_add_to_cart', 10 ); function my_woocommerce_template_loop_add_to_cart() { echo '<form action="' . get_permalink() . '" method="get"> <button type="submit" class="single_add_to_cart_button button alt">Read More</button> </form>'; }
I’ve only tested in one theme, and haven’t tried it using shortcodes. Hope it helps!
Cheer,
Joel
Forum: Plugins
In reply to: [Import Users from CSV] Upload fails, no errorsThanks @ellenloehman. Saving to a Windows CSV in Mac Excel fixed the issue I was having too.