nbdevelopgreece
Forum Replies Created
-
Forum: Plugins
In reply to: [WooCommerce] Displaying frontend product price in admin edit pageHello @conschneider !
How about:
$product->get_price_html();
Does that go into the right direction?Unfortunately not. It still returns the initial price without a discount.
Forum: Plugins
In reply to: [WooCommerce] Displaying frontend product price in admin edit pageHey @shaunkuschel,
Thanx for the reply! I really appreciate anyone who offers me help. I want the price right where the hook points which is in the product edit page inside the product data tab. https://prnt.sc/15qyhjn
I am using either “Woo Discount Rules” or “Finale lite” and will pick the one that works. Usually the discount trigger is “if in a specific category then -50%” (which either plugin does when asked)
If a sale price is set in the product ( https://prnt.sc/15r0asu ) then the “$product->get_sale_price()” returns that price, but that is not what I want. I want to get the frontend price.
Forum: Fixing WordPress
In reply to: On post update console log: [Deprecation] Synchronous XMLHttpRequestThank you for your reply. I think I tried everything. WP Downgrade on 4.9.15 did not solve the problem. PHP is not the problem either.
For now I solved the problem in a really unorthodox way but it does the job for now.
Hi @xlplugins,
I tried what you suggested and it is not working (it seemed it would not work in the first place to be honest because there is no connection with $product).
Also what do you mean hook? I get the product details in the $product object with:
$product = wc_get_product( $ID );Then I get the price with: $product->get_price()
or (i.e.) the title with: $product->get_name()Hi @xlplugins and thank you for your reply.
Unfortunately this is not working. My thought is that I can not use this filter if I do not know the sale price in the first place.
The basic code I have is:
$product = wc_get_product( $ID ); $normal_price = $product->get_price(); echo $normal_price; //it prints normally $finale_sale_price = //what must I do to get the finale sale price here? echo $finale_sale_price; //I also tried (with no result) //to get first variation $product_variations = $product->get_available_variations(); $variation_product_id = $product_variations [0]['variation_id']; $variation_product = new WC_Product_Variation( $variation_product_id ); //based on first variation get regular and sale price echo $variation_product->regular_price; //displays regular price normally echo $variation_product->get_sale_price; //empty echo $variation_product->get_variation_sale_price; //empty print_r($product->get_variation_prices()); //displays an array with variations all of them with the regular prices echo $product->get_variation_regular_price(min,false); //displays regular price normally echo $product->get_variation_sale_price(min,false); //displays regular price echo $product->get_variation_price(min,false); //displays regular price
Forum: Plugins
In reply to: [Yoast SEO] Get Yoast og:title into variable inside functions.phpHi @jeroenrotty
Thats great! This is what I was trying to find and the page is very useful.Thank you both for your help!
What worked for me:
$ogtitle = YoastSEO()->meta->for_current_page()->open_graph_title;
Forum: Plugins
In reply to: [Yoast SEO] Get Yoast og:title into variable inside functions.phpHello! Thanx for the reference!
However, I can see snippets about how to change images/sizes/types but not how to change attributes like title/description or how to get them.
If I am wrong, could you please point me to the snippet I should look into?
Forum: Plugins
In reply to: [AMP for WP - Accelerated Mobile Pages] Unwanted page redirectOur seo specialist suggests 302 over 301 because the amp redirect should be temporary and not permanent.
Forum: Plugins
In reply to: [AMP for WP - Accelerated Mobile Pages] Loading too small imagesYes it is fixed. Just to point out that the correct image size could be used for a better pagespeed score but the website performs better than before so I think it is too much to ask. (also I do not know if it is theme related at some point)
Anyway, problem solved so I would like to thank you very much for your help!
Forum: Plugins
In reply to: [AMP for WP - Accelerated Mobile Pages] Unwanted page redirectYes it is fixed. I could not find that specific setting and I just hided the amp for current page. Thank you for your help.
Could you help me with making 302 redirects to amp and not 301? Thank you in advance.
Forum: Plugins
In reply to: [AMP for WP - Accelerated Mobile Pages] Loading too small imagesNo I am definitely not using retina images and no I have not changed the image size. The uploaded post images are 800×500.
Forum: Plugins
In reply to: [AMP for WP - Accelerated Mobile Pages] Unwanted page redirectIt is the blog page when accessed from mobile: developgreece.com/blog
Forum: Plugins
In reply to: [Free Shipping Bar for WooCommerce] Plugin not getting textHi @thanhtd
I would be happy to do, if I knew where and how to do it. Please excuse my ignorance. Thank you in advance.Forum: Plugins
In reply to: [WooCommerce] Emails are not sent for every change of order statusUpdate:
I created a test server where I copied all content, uninstalled all plugins and tested only with woo-commerce and default theme activated. Still the same problem. No emails sent for some order status changes.Then I installed Wp-email-logging and tested. No change.
Then I installed wp-mail-smtp and tested. No change.
Forum: Plugins
In reply to: [WooCommerce] Emails are not sent for every change of order statusHello and thank you for your reply!
I have already tested the email log through that specific plugin you mentioned (wp mail logging) and every email that was logged, was received by 2 test email addresses. After that, I did test a default theme and deactivated every possible plugin that might result in a conflict. To be honest I left plugins like yoast and contact form 7 but these were tested plugins in many sites. (Both clearing cache between tests and deactivating it completely.)
Apart from that, I do not know what to do to narrow down any possible problems/conflicts.