DigitalDynastyDesign
Forum Replies Created
-
Forum: Plugins
In reply to: [WooCommerce] Changing WooCommerce Uploads DirectoryI was able to solve this using a plugin called “Custom Upload Dir”
Keep in mind, that if you change your default upload directory for paid virtual items, you may want to look at securing it so people don’t just browse right to the item(s). All my virtual products are free, so this issue doesn’t affect me.
Forum: Plugins
In reply to: [WooCommerce] Thumbnails are Missing in Media LibraryI was able to solve my problem by changing the default WooCommerce upload directory. I used a plugin called “Custom Upload Dir” and simply made the uploads go right into the default wordpress uploads folder.
Something to note, all my virtual products are free so it doesn’t matter to me if people can just browse directly to the items, which is what they can do now that I’ve changed this. If you’re selling your items you may want to look at securing where your virtual goods are being stored.
Forum: Plugins
In reply to: [Yoast SEO] Yoast conflict, still breaks Visual ComposerI got around this by disabling Yoast SEO, doing the update, then activating it.
If you’ve already done the update, you might try disabling and activating Yoast SEO.
Now both Visual Composer and Yoast SEO are working.
Forum: Plugins
In reply to: [WooCommerce] Adding Downloadable Files to Product Type – WooCommerceAnyone have any solutions?
Alright through some digging, and moving stuff around I was able to get it working.
In order to get the download now button only on the single product pages I changed the ‘woocommerce_after_shop_loop_item’ from wooassist’s solution to ‘woocommerce_single_product_summary’
Then, in order to get the actual product to download (I kept getting errors such as ‘no file’ or nothing would happen when the button was pressed), I used part of the solution here and married it with the remainder of wooassist’s solution.
Here’s my full code:
add_action( 'woocommerce_single_product_summary', 'wa_change_add_to_cart', 10 ); function wa_change_add_to_cart() { global $product; $downloads = $product->get_files(); foreach( $downloads as $key => $each_download ) { echo '<form action="' . esc_url($each_download["file"]) . '" method="get"> <button type="submit" class="single_add_to_cart_button button alt">Download Now</button> </form>';} }
Thanks a lot wooassist, you got me on the right track, was trying to figure this out for a few days now.
Hello, thanks for the reply.
I tried pasting that code into my child theme’s function and “Download Now” links appear, but in the product archive page/shop page. They don’t appear on the individual product pages.
Pressing the Download Now button also doesn’t download anything because the links aren’t on the actual product pages.
Is there some sort of fix for this?
Forum: Fixing WordPress
In reply to: Replace WooCommerce Add to Cart button, with a free Download buttonI’ve re-posted in the area that James has suggested.
Should anyone need to follow this issue, the new post is here