callachic
Forum Replies Created
-
Hi, yes it seems that manually refreshing it doesn’t work, but I need to wait for daily reload then the filter seems to work now.
Thank you very much for your help!
Hi, this is the URL:
https://www.tweetpaperie.com/wp-content/uploads/woo-product-feed-pro/logs/debug.logThe project name whose data wasn’t updated is: TweetPaperie-GoogleMerchant
Thank you!
@webtoffee Thanks for your kind help, the code works like a charm =)
@webtoffee when I try to add the above code, I got the following error when I try to generate the shipping labels:
Fatal error: Uncaught ArgumentCountError: Too few arguments to function wt_pklist_add_custom_css_in_shippinglabel(), 2 passed in /home/ernal266/public_html/tokomasmulia.com/wp-includes/class-wp-hook.php on line 287 and exactly 3 expected in /home/ernal266/public_html/tokomasmulia.com/wp-content/plugins/mulia-additional-codes/mulia-additional-codes.php:111 Stack trace: #0 /home/ernal266/public_html/tokomasmulia.com/wp-includes/class-wp-hook.php(287): wt_pklist_add_custom_css_in_shippinglabel(”, ‘shippinglabel’) #1 /home/ernal266/public_html/tokomasmulia.com/wp-includes/plugin.php(206): WP_Hook->apply_filters(”, Array) #2 /home/ernal266/public_html/tokomasmulia.com/wp-content/plugins/print-invoices-packing-slip-labels-for-woocommerce/admin/modules/customizer/customizer.php(347): apply_filters(‘wf_pklist_add_c…’, ”, ‘shippinglabel’) #3 /home/ernal266/public_html/tokomasmulia.com/wp-content/plugins/print-invoices-packing-slip-labels-for-woocommerce/admin/modules/customizer/customizer.php(772): Wf_Woocommerce_Packing_List in /home/ernal266/public_html/tokomasmulia.com/wp-content/plugins/mulia-additional-codes/mulia-additional-codes.php on line 111
There has been a critical error on your website. Please check your site admin email inbox for instructions.I see.. Ok thanks for your help. I’ll try to contact their support for this =)
Hi @alexmigf
Not sure how to put a screenshot here. But i’ve uploaded screenshot here:
https://www.dropbox.com/s/yxrjob85fn6dyar/screen1.jpg?dl=0
Above is the additional settings from the WooCommerce Checkout Manager that I use (basically I don’t have any additional custom field)https://www.dropbox.com/s/xv5zlaa6i1gsmcb/screen2.jpg?dl=0
And above is the resulted invoice. The one circle in red always shown (though there’s no additional field).The only way I can make it disappear is:
1. Disable the Woocommerce Checkout Manager (but I actually need to use this plugin), OR
2. Comment the following line from invoice.php included in your plugin:
<?php do_action( ‘wpo_wcpdf_after_order_details’, $this->type, $this->order ); ?>Is there anyway I remove this using code in my function.php file? I prefer not to touch your invoice.php as it’ll be overwritten if there’s update to the plugin..
Thank you again!
OOOHHH i managed to make it work with your code!! THANK YOU SO MUCH FOR YOUR HELP! Really appreciate it!
Hi @alexmigf
Thanks for your reply. I’m really a noob at this. I’ve added that code to my custom plugin but it’s still not showing anything.
My product setup:
I added custom attribute at the product (using the default one provided by WooCommerce), I set it to be like this:
Kadar = 700
Panjang = 17cm
(These 2 are to be displayed in the invoice as well)In case you want to see, the product is at the following link, and the details are in “Additional Information” tab:
https://www.tokomasmulia.com/product/gelang-bola-bola-3-warna/So do I modify it to be like the below? It’s still not showing anything..
add_action(‘wpo_wcpdf_after_item_meta’, ‘wpo_wcpdf_show_custom_attribute’, 10, 3);
function wpo_wcpdf_show_custom_attribute($document_type, $item, $order)
{
if( !empty($order) && $document_type == ‘invoice’ ) {
$product = wc_get_product($item[‘product_id’]);
$attributes = $product->get_attributes();
foreach( $attributes as $type => $attribute ) {
if( $type == ‘my-custom-attribute’ ) { // attribute type
echo ‘<dl class=”meta”>’;
echo ‘<dt class=”my-custom-attribute”>’.$attribute[‘Kadar’].’:</dt><dd”>’.$attribute[‘options’][0].'</dd>’;
echo ‘</dl>’;
}
}
}
}Your kind help is very much appreciated..