edit7279
Forum Replies Created
-
Forum: Plugins
In reply to: [WooCommerce] admin-ajax.php slowing down siteIt just dawned on me that the reason it may be called twice on the homepage is that I have the shop page embedded in an iframe on my homepage so it looks like a product slider…
admin-ajax.php is only called once on the shop page url.
It’s called twice on a single product page…I’m assuming because I’m running Gravity Forms and Gravity Forms uses all kinds of resources.
Forum: Plugins
In reply to: [WooCommerce] admin-ajax.php slowing down siteWell, one culprit was Wordfence. After getting rid of it I had huge improvements. Still showing two calls for the admin-ajax.php file as you can see on this updated graphic: https://www.ashlynnpress.com/imgs/pageload2.png
Forum: Plugins
In reply to: [WooCommerce] Change default order statuses of cash and cheque.Yes, you can just change it in the Gateway folder, but it would get overwritten if/when you update woocommerce. But, to do it in your functions.php file, put the following and change ‘processing’ to whatever you want the default status to be for ALL orders. I’m not sure how you’d modify it to apply to just cheque and/or COD orders, and not credit cards.
add_action( 'woocommerce_thankyou', 'custom_woocommerce_auto_complete_order' ); function custom_woocommerce_auto_complete_order( $order_id ) { global $woocommerce; if ( !$order_id ) return; $order = new WC_Order( $order_id ); $order->update_status( 'processing' ); }
Forum: Plugins
In reply to: [WooCommerce] Safe to change customer usernames without loosing orders?Okay scratch, that. Apparently you can’t change usernames. Guess you’ll have to go about it as JovanaV suggested.
Forum: Plugins
In reply to: [WooCommerce] Safe to change customer usernames without loosing orders?Or easier, just create a user, place an order and then change their name and see what happens. Think I’ll try that myself and see what happens.
Forum: Plugins
In reply to: [WooCommerce] How do I remove shop widgetsThose can usually be removed by going to Appearance -> Widgets and look for them in one of your sidebar widgets.
Forum: Plugins
In reply to: [WooCommerce] Variable text under featured imageFigured it out. No need for Advanced Custom Fields after all.
add_action( 'woocommerce_product_thumbnails' , 'add_below_featured_image', 9 ); function add_below_featured_image() { if( is_single( pageidhere ) ) { echo '<br><img src="urlhere">'; } }
Forum: Plugins
In reply to: [WooCommerce] Variable text under featured imageOkay, getting even closer I think…
I found a snippet of code from someone who successfully added content to a single page using the following:add_action( 'woocommerce_single_product_summary', 'woocommerce_template_top_category_desc', 1 ); function woocommerce_template_top_category_desc (){ $terms = get_the_terms( $post->ID, 'wc-attibute-class' ); if ( !empty($terms)) { $term = array_pop($terms); $text= get_field('txt-field', $term); if (!empty($text)) { echo $text; } } }
Now I’m just trying to figure out how to modify it to display an image instead of a text field.
So far I have this, but it’s still not working.
add_action( 'woocommerce_product_thumbnails' , 'add_below_featured_image', 9 ); function add_below_featured_image() { $terms = get_the_terms( $post->ID, '496' ); if ( !empty($terms)) { $term = array_pop($terms); $image = get_field('banner_feedback', $term); if (!empty($image)) { echo $image; } } }
Forum: Plugins
In reply to: [WooCommerce] Variable text under featured imageThanks. I think that put me on the right track…
I installed Advanced Custom Fields, created an image field and assigned it to a page/product. Then I went to the product edit screen and it allowed me to upload the image to that specific product.
But, I can’t figure out how to actually display the image on the product page. Will this be done via an action in functions.php or through PHP itself?
In the documentation (https://www.advancedcustomfields.com/resources/image/), all I see is php to render the image, but wouldn’t this put the same image on all pages?
I need something like…
If product = Banners then display image ‘banner_feedback’
Forum: Plugins
In reply to: [WooCommerce] eBook Layout IssueDisable comments on your pages. It looks like you have them enabled.
Forum: Plugins
In reply to: [WooCommerce] About breadcrumbAre you using any SEO plugins? I had this problem before and it was due to whichever SEO plugin I had messing up the breadcrumbs.
Forum: Plugins
In reply to: [WooCommerce] Shop doesn't fit into page-it's too big!Long story short… to answer your question about what’s wrong with your site… the woocommerce shop pages run off a different CSS than your wordpress site… so it looks jacked. Go with a woocommerce theme.
My site looked like yours initially, because I just added woocommerce to my existing wordpress site.
I spent days editing the CSS to get the shop pages to look right, but then I realized that a lot of other stuff will not work on a regular wordpress site, mainly the ajax functions, etc.
I ended up going with a woocommerce theme and just made it look like my original site. Now all is lovely.
Forum: Plugins
In reply to: [WooCommerce] Short description box when hovering product imageYou could do this with jQuery. My site does something like this (unintentionally).
Go here https://www.ashlynnpress.com/product/banners/ and hover over the picture. It will say ‘Banner’ in a smooth functioning blue popup box, because that is what I named the pic when I uploaded it.
I’m guessing you could simply name your pic with the short description you want and you would get the effect you’re going for.
Cheesy, but it would solve the problem.
Forum: Plugins
In reply to: [WooCommerce] Shipping details not showing up on manually placed ordersI just discovered that if you are manually adding an order, you must assign shipping costs, even if $0.00 and then update totals. This will in turn assign a shipping variable and make the shipping address show up on emails, etc.
Forum: Plugins
In reply to: [WooCommerce] Should refunds show on order details in My Account?Awesome, thanks Roy. I’ll check it out in a few.
I was going to code it later today, but I’m still trying to figure out another issue… I can’t get the ajax-loader.gif to change size.
I changed the image easy enough, but for some reason it’s stuck at 16×16 pixels and my new image is 130×130. I have looked in every single file and removed/changed the four instances of 16×16 I found, but its still that size.