houtai
Forum Replies Created
-
Forum: Plugins
In reply to: [PDF Invoices & Packing Slips for WooCommerce] Upgrade Fatal Error: ClassYea it was very strange. We downloaded the plugin files straight from the wordpress sites which included the vendor libraries. We are not on HHMV.
It’s a mystery to me as well, we checked the error logs when install the plugin but nothing popped up.
I’m no expert either, just asked my senior dev. But it shouldn’t increase the memory consumption that much.
composer dump-autoload -o
just outputs an array of strings. He linked me these articles about composer that might help you.https://moquet.net/blog/5-features-about-composer-php/
https://getcomposer.org/doc/articles/autoloader-optimization.md
Forum: Plugins
In reply to: [PDF Invoices & Packing Slips for WooCommerce] Upgrade Fatal Error: ClassHi,
So we figured out the issue. The autoload_classmap file was not being generated correctly.I went into the plugins folder through ssh and ran:
composer dump-autoload -o
That generated the correct autoload_classmap file and now I can see the pdf being generated
Forum: Plugins
In reply to: [PDF Invoices & Packing Slips for WooCommerce] Upgrade Fatal Error: ClassSo i’ve tried uninstalling and delete all the plugin files and re-uploading them. Still doesn’t work. :/ I don’t use any other pdf creation plugins.
The file is there so it definitely is not trouble with the install.
The PHP version we use is 5.6.31
I’m not sure what else to do..
I think i’ve figured out the issue or at least from my code.
When hooking into woocommerce_checkout_update_order_meta and woocommerce_payment_successful_result actions you can’t call a new variable like so.
// $variation = new WC_Product_Variable( $meta['_variation_id'][0] );
I’ll have to get back to you on that.
I can give you the hooks/actions we are using.
Actions:
woocommerce_new_order_item
woocommerce_checkout_update_order_metaFunctions:
wc_add_order_item_meta
wc_update_order_item_metaWe also create a new WC_Product_Variable in the woocommerce_checkout_update_order_meta but I don’t think that’s the issue.
Hey Mike I really appreciate the help. I’m not entirely sure how to turn off WC_Subscriptions_Synchroniser but when I delete our add/update_order_item_meta functions it will checkout with no issue.
Tracing it back further it read gets called after WC_Subscriptions_Synchroniser::mayber_add_meta_for_new_line and WC_Subscriptions_Synchroniser::is_product_synced finds that the product/subscription in question is not an object. Then wc_get_product is called right after.
It seems to be related to whenever I try to add order item meta or update the meta values.
When i turn on debug i get this error message instead
SyntaxError: Unexpected token < in JSON at position 0
Forum: Plugins
In reply to: [WooCommerce] “Invalid product.” error at checkout variable productsI’m having the same issue as well. Does anyone know a fix, or lead me in the right direction.