pdsxerox
Forum Replies Created
-
Absolute rockstars. Thank you so much, reverting to the simple theme did the trick.
Could the fact that I’m using a template in my child theme be the issue?
Hi @kluver
Thank you for the reply! When I added the snippet to my function.php file, it crashes the plugin:
Fatal error: Too few arguments to function wpo_wcpdf_change_title_based_on_payment_method(), 1 passed in /nas/content/live/eoebusiness/wp-includes/class-wp-hook.php on line 303 and exactly 2 expected
Again, I’m in the dark as far as how this all works and I totally appreciate any help you can offer.
Cheers and have a great weekend!
Thank you, Yordan, for the reply!
The numbering sequence isn’t important. I tried to assemble some code from other posts and failed; I’m really not sure what I’m doing, and I’m probably about to embarrass myself on a public forum:
add_filter( ‘wpo_wcpdf_invoice_title’, ‘wpo_wcpdf_invoice_title’);
function wpo_wcpdf_invoice_title ( $title ) {
$payment_method = get_post_meta(‘_payment_method’, true );
if ($payment_method == ‘cod’) {
$title = ‘Product Quote’;
return $title;
}
else {
$title = ‘Invoice’;
return $title;
}
}Here’s the link so you can see how we’re using this: https://www.eoeusvi.com/
If you put something in your cart and click through the checkout process, you’ll see at the end an option for either PayPal or a Quote. Schools and other government entities want the quote and then will pay the quote later when approved. So if there was a way to conditionally set the title of those PDFs to Invoice so we know it’s paid or Quote so we know it’s pending, that’s our hope.
Again, thank you for your reply!
- This reply was modified 3 years, 2 months ago by pdsxerox.
Forum: Plugins
In reply to: [WooCommerce] Product editor has white on white text and no visual editorFIXED: I had the same problem, easy fix:
Locate your plug-in folder (FTP) and inside the, “woocommerce-video-product-tab” folder, edit the, “woocommerce-video-tab.php” file. You might need to download it, edit it locally and then reload it to your server.
Go to line 223. There you will see:
$tab_data[]
Add this line above that line of code:
$tab_data = array();
Save the file, reload it to where you got it and enjoy.
If you’re wondering, $tab_data is defined as a string earlier, this resets it to an array and make it usable again.
FIXED: I had the same problem, easy fix:
Locate your plug-in folder (FTP) and inside the, “woocommerce-video-product-tab” folder, edit the, “woocommerce-video-tab.php” file. You might need to download it, edit it locally and then reload it to your server.
Go to line 223. There you will see:
$tab_data[]
Add this line above that line of code:
$tab_data = array();
Save the file, reload it to where you got it and enjoy.
If you’re wondering, $tab_data is defined as a string earlier, this resets it to an array and make it usable again.