Alin Ionut
Forum Replies Created
-
Forum: Developing with WordPress
In reply to: WP REST API create post with metaNevermind, figured out.
Forgot to register_meta and show it in rest
Forum: Plugins
In reply to: [WooCommerce] “Invalid product.” error at checkout variable productsI took my time today to put my website on localhost and start debugging this.
Bottom line, found my problem on a custom hook method:
$order = new WC_Order(here_order_id_from_hook); foreach ($order->get_items() as $order_products) { $product_variation_id = $order_items_single['variation_id']; if ($product_variation_id) { $product = new WC_Product($product_variation_id); } else { $product = new WC_Product($order_items_single['product_id']); } }
If the product is variable, is not working anymore like this. My new code replace $product_variation_id with $order_items_single[‘product_id’] and it’s fine now.
Basically, this check is not necessary, for me.
- This reply was modified 7 years, 6 months ago by Alin Ionut.
Forum: Plugins
In reply to: [WooCommerce] “Invalid product.” error at checkout variable productsNop, restore backup files + db
Forum: Plugins
In reply to: [WooCommerce Multilingual & Multicurrency with WPML] Checkout with paypalYour code put me the currency on checkout on Romanian in Euro. I do not want this, and as default, I do not have Paypal as checkout option.
Thank you.
Forum: Plugins
In reply to: [WooCommerce Multilingual & Multicurrency with WPML] Checkout with paypalThank you George, but this I already accomplish.
I need to checkout only on Paypal with euro, other checkout options must remain in Romanian currency (lei).
Right now on Romanian with Lei, the checkout with Paypal option is gone, because, as you know, Paypal do not support Romanian currency (lei).
Forum: Fixing WordPress
In reply to: ActionScheduler comment on every post_IDThe plugin, as I say above, was Follow-Up email.
Works like a charm, thank you sir.
I want that the loop above to retrive not just the comment from posts with the same tag, and the comments from products that have _sku the same as the curent post tag.
1. Post patent have the tag ‘test’
2. Another posts that have comments on it, and with the same tag ‘test’.
Until here everyting is great.
3. Post_type = product with sku ‘test’ have comments, not tag ‘test’!
4. Combine all comments from posts with tag ‘test’ and products with sku ‘test’.Works perfect. Thank you sir.
Now I need someting a little more, I forgot to mention earlier.Is it possible to retrive and comments from woocommerce product in the same loop of course? Sku product = post tag
My code is
<?php $posttags = get_the_tags(); if ($posttags) { foreach($posttags as $tag) { $args = array( 'post_type' => 'product', 'posts_per_page' => 1,'meta_key' => '_sku', 'meta_value' => '' . $tag->slug .'', 'compare' => '='); } } $loop = new WP_Query( $args ); while ( $loop->have_posts() ) : $loop->the_post(); global $product; ?>
Sorry, but is not what I’m looking for. I do not want to retrieve manually ID for tags, I want to be automatic, to take the tag of the current post, and display all the comments of that specific posts tag.
Now I try with this code, but the same result, in last 5 comments overall.
<?php $posttags = get_the_tags(); if ($posttags) { foreach($posttags as $tag) { $args = array( 'number' => 5, 'tag' => ''. $tag->slug .'', 'orderby' => 'date', 'order' => 'DESC' ); }}?> <?php $comments = get_comments($args); foreach($comments as $comment) : echo($comment->comment_author . '<br />' . $comment->comment_content); endforeach;?>
Forum: Fixing WordPress
In reply to: ActionScheduler comment on every post_IDSry for not reply, my problem was at a plugin, I have downgrade it until they fix it and delete manually all the fake comments. Plugin was follow-Up emails.
Forum: Fixing WordPress
In reply to: Same contend, diferent links and themeLooks like I do it, but I want that all my featured images to be loaded from the main site, not to copy them on aoo.x.com
any ideas?
Forum: Plugins
In reply to: [Woocommerce Products Price Bulk Edit] Changelog 1.0.2 but version 1.0Great, thx. But now I have a little problem. When I put a price let’s say 9.99 it retrive me just 9.00 on product page. I try and with 9,99 but same result.
Forum: Plugins
In reply to: [Woocommerce Products Price Bulk Edit] Only admin can access this plugin!Same thing here. Waiting for next update.