Rallendk
Forum Replies Created
-
Forum: Hacks
In reply to: Get differences in post revisionsThanks! I don’t think I explained myself clear enough tho..
The problem is, that the revisions in editor gets me all changes, whilst the code only gives me the title.
Those are examples for the same revisions of the same post:
Editor:
https://i.stack.imgur.com/hf5Dk.pngYour code snippet:
Title #1 Title #1Forum: Hacks
In reply to: Get differences in post revisionsThank you – I got the function to work now. However, the result isn’t quite what I expected. When comparing to revisions in the editor, the result is the following:
When comparing the same revisions using wp_get_revision_ui_diff, the result is this:
Array ( [0] => Array ( [id] => post_title [name] => Title [diff] =>
Title #1 Title #1
) )How can I get the same revisions as the editor has?
Forum: Plugins
In reply to: [WooCommerce] Hook into variation priceWell, I’m adding it i my functions.php where I’ve succesfully hooked into my woocommerce_get_price_html. I am testing it with a B2B-kaffe user exactly the same way I do with my working woocommerce_get_price_html example. Im starting to get confused now ??
Forum: Plugins
In reply to: [WooCommerce] Hook into variation priceThanks for your reply. Unfortunately, that doesn’t do any difference. Below is my exact code:
add_filter( 'woocommerce_get_variation_price_html', 'variation_price_b2b', 10, 2); function variation_price_b2b( $price, $variation ) { if (current_user_can('B2B-kaffe')) { return $price . ' ekskl. moms'; } }
Forum: Plugins
In reply to: [WooCommerce] Hook into variation priceHey Mike.
Im not sure I understand your last reply. Can you please elaborate?
How would I change my function to target the place in my screenshot?
Forum: Plugins
In reply to: [WooCommerce] Hook into variation priceThanks for your fast reply Mike. This is the price in question: https://imgur.com/a/9LA4W
Forum: Plugins
In reply to: [WooCommerce] Hook into variation priceShould I just hook into the woocommerce_variation_price_html? I am looking for a way to add a suffix after the prices. I thought I could use the following approach, but it doesn’t seem to work.
add_filter( 'woocommerce_variation_price_html', 'my_html', 10, 2); function my_html( $price, $variation ) { return $price . ' suffix'; }
Forum: Plugins
In reply to: [WooCommerce] No lightbox on thumbnailHey Mike.
Thanks for your suggestion. I have tried removing the overridden files one by one, but it doesnt seem to fix my issue. Seriously, this is do damn strange…
Forum: Plugins
In reply to: [WooCommerce] Ajax add to cart stopped workingThanks! ?? No updates on the theme, but it works again after using the newest loop/add-to-cart.php from woo.
Forum: Plugins
In reply to: [WooCommerce] Order import with correct order IDHey Mike.
I just tried what you suggested. My orders are now working correctly, but after importing my other content on top, pretty much everything else is screwed. Most of my posts lost their images and I get a grey screen of death when trying to edit a post.
Isn’t there somehow I can export everything order related from my old sites database and import it in the new one? Everything else seems way too complicated with lots of culprits.
Forum: Plugins
In reply to: [WooCommerce] Order import with correct order IDWell. That makes sense. However, I have a lot of other changes – widgets, settings and stuff, that I dont want to overwrite.. Can I avoid this somehow?
Forum: Plugins
In reply to: [WooCommerce] Order import with correct order IDThanks, but that wont help me out. I can move the database manually if thats what needed – however, I have made lots of changes on the new site, so I dont want to overwrite everything..
Forum: Plugins
In reply to: [WooCommerce] Can't buy private productsThanks again Mike. Im not sure i follow though. Can you please elaborate on the last link?
Forum: Plugins
In reply to: [WooCommerce] Can't buy private productsThanks for your reply. It has a price and everything. The exacty same product works as it should when it’s not set to price. As soon as it’s marked private however, I can’t purchase it.
Forum: Plugins
In reply to: [WooCommerce] Backend translations?Thanks! I didn’t know there was an admin file as well. My Loco Translate doesn’t find this. I have managed to edit it manually, though. Thanks for your help.