Pepro Dev. Group
Forum Replies Created
-
Forum: Plugins
In reply to: [PeproDev Ultimate Invoice] Add Custom MacroYou are welcome.
I’m closing the topic.
If there’s anything else please let me know.Forum: Plugins
In reply to: [PeproDev Ultimate Invoice] Add Custom Macrohttps://gist.github.com/amirhp-com/37f64ae0aff71d9337900f1ec2f57d30
- This reply was modified 4 years, 2 months ago by Pepro Dev. Group.
Forum: Plugins
In reply to: [PeproDev Ultimate Invoice] Add Custom MacroDear @arndofiore80, you should use the macro like other macros, with three opening and three closing curly braces, without any space between. The reason we put it like { { {remaining-qty} } } is because the WordPress forum does not allow us to use more than one curly brace attached to a word.
Please ignore slashes in the following line and use a macro like:
{{\{remaining-qty\}}}- This reply was modified 4 years, 2 months ago by Pepro Dev. Group.
- This reply was modified 4 years, 2 months ago by Pepro Dev. Group.
Forum: Plugins
In reply to: [PeproDev Ultimate Invoice] Add Custom MacroSo, the problem is solved?
Forum: Plugins
In reply to: [PeproDev Ultimate Invoice] Add Custom MacroHi,
You should first make a custom template using the guidelines given here:
https://github.com/peprodev/ultimate-invoice/wiki/Add-Customized-External-Template-to-Ultimate-InvoiceThen you need to add a custom macro to use in each order line item, something like the below snippet, and place it in the template you’ve created. (files with the “.row” suffix in the name).
add_filter( "puiw_printinvoice_create_html_item_row_metas", "my_custom_lineitems_macros", 10, 5); // add the macro: { { { remaining-qty } } } function my_custom_lineitems_macros ($macros, $item_id, $item, $product_id, $order){ $product = $item->get_product(); $current_qty = $product->get_stock_quantity(); $bought_qty = $item->get_quantity(); $remaining_qty = (int) $current_qty - (int) $bought_qty; $macros["remaining-qty"] = $remaining_qty; return $macros; }Important note:
This snippet calculated the remaining quantity based on the current quantity of purchased product and NOT the stock amount of product at the time user placed the order. If you wish to not calculate based on the live stock amount value, you should save quantity amount of each line item when user places order and then retrieve it to calculate and show on invoice.- This reply was modified 4 years, 2 months ago by Pepro Dev. Group.
Forum: Plugins
In reply to: [PeproDev Ultimate Profile Solutions] امکان ارسال پیام یا تیکتسلام این امکان تحت عنوان ماژول تیکتینگ توسعه پیدا کرده که به زودی در اختیار مشتریان قرار میگیرد. متشکرم
Hi, thank you for your contribution.
We have released a new version and fixed the issue.Hi, could you please share with us the snippet you used, so we could help others too?
Hi, there’s no limit to number of gateways you wish to use, but you have to activate those first in WooCommerce payment options.
Forum: Plugins
In reply to: [PeproDev WooCommerce Receipt Uploader] How to fix Unknow server errorHi, this is usually due to hosting provider.
Please test the plugin in a clean installed WordPress on another hosting and if issue persists, let us know.Forum: Reviews
In reply to: [PeproDev WooCommerce Receipt Uploader] Great plugin, excellent support!Thank you for your warm words of love, we really appreciate your kindness and support.
Forum: Fixing WordPress
In reply to: The requested URL /wp-login.php?redirect_to=Hi, it seems the file wp-login.php is missing from your host or it’s access is blocked.
Forum: Fixing WordPress
In reply to: Billing address on “Thank you” page and emailsHi, the simplest way is to use Checkout Field editor plugin.
Forum: Fixing WordPress
In reply to: Custom Email not Getting TemplateHello, could you share your snippet with us?
Forum: Fixing WordPress
In reply to: How to move WordPress to new server when old server is formatted?Hello,
Because you are using localhost, you might still have database files in your storage, just google it and try finding database file. If you succeed in recovering database then it’s all set for you to re-install WordPress on localhost server A and set database setting as localhost A.