WPIntell

Source evidence

Error on create new subscription

YITH WooCommerce Affiliates · support · 2025-08-25T06:14:00+00:00

mixedsentiment
highseverity
0.94relevance
11replies
Evidence linked to opportunitycommercial context

Proof Health

Open evidence

Commercial opportunities need traceable source links before they are treated as build-worthy.

4 / 30 rows with source links

13.3% of this page's analysis has direct source links.

0 build-decision rows missing links

0 rows here require auditable proof before promotion.

26 rows with no attached evidence

0 rows have source counts but still need direct links.

Conversation

support
damasovelazquez resolved
Hello, When I click on the ‘New subscription’ button, an error appears in the right-hand box of the plugin information and the following error message appears in the log. [25-Aug-2025 06:07:03 UTC] PHP Fatal error: Uncaught Error: Call to a member function get_total() on bool in /home/web01/public_html/wp-content/plugins/yith-woocommerce-affiliates/views/meta-boxes/referral-commissions-metabox.php:40 Stack trace: #0 /home/web01/public_html/wp-content/plugins/yith-woocommerce-affiliates/includes/admin/meta-boxes/class-yith-wcaf-order-referral-commissions-meta-box.php(74): include() #1 /home/web01/public_html/wp-admin/includes/template.php(1456): YITH_WCAF_Order_Referral_Commissions_Meta_Box::print() #2 /home/web01/public_html/wp-admin/edit-form-advanced.php(714): do_meta_boxes() #3 /home/web01/public_html/wp-admin/post-new.php(75): require('/home/web01/...') #4 {main} thrown in /home/web01/public_html/wp-content/plugins/yith-woocommerce-affiliates/views/meta-boxes/referral-commissions-metabox.php on line 40 Can you help me, please? Thank you. Hello there, thanks for contacting us! Could you please tell us which version of Affiliates you’re using, and which Subscriptions plugin? Let us know. Best regards. The last one: 3.20.0 Thank you. And WooCommerce Subscriptions version is 7.8.1. Hello there, That plugin is paid, so I don’t have access to it. However, try adding the following code to your active theme’s functions.php file: if ( ! function_exists( 'yith_wcaf_commissions_metabox_order_total_fix' ) ) { function yith_wcaf_commissions_metabox_order_total_fix( $total, $order ) { $total = $order instanceof WC_Order ? $order->get_total() : 0; return $total; } add_filter( 'yith_wcaf_commissions_metabox_order_total', 'yith_wcaf_commissions_metabox_order_total_fix', 99, 2 ); } Could you check it, please? Best regards. Hello, thank you very much for reviewing this error. I have tried the code you sent me, but I am still getting the same error. Any ideas? Thank you very much. Hello there, Could you confirm for me that the first line of the error has the number 40 at the end like this? [25-Aug-2025 06:07:03 UTC] PHP Fatal error: Uncaught Error: Call to a member function get_total() on bool in /home/web01/public_html/wp-content/plugins/yith-woocommerce-affiliates/views/meta-boxes/referral-commissions-metabox.php:40 Let us know. Best regards. Yes. I confirm it.. Hello there, Please in the line 40 of the following file: \wp-content\plugins\yith-woocommerce-affiliates\includes\admin\meta-boxes\class-yith-wcaf-order-referral-commissions-meta-box.php add the following code: if ( ! $order || ! $order instanceof WC_Order ) { return; } Could you check it, please? If it works correctly, we will include that change in the next version of the plugin. Best regards. Solved, mate. I’m waiting for that new version. Thank you very much for your work. Hello there, you’re welcome! We’ve just added the change to the plugin, and it will be available in the next version (3.22.0). Best regards. Thank you! Best regards.

Comments

11 shown
Juan Coronel 2025-08-25T16:39:00+00:00

Hello there, thanks for contacting us! Could you please tell us which version of Affiliates you’re using, and which Subscriptions plugin? Let us know. Best regards.

damasovelazquez 2025-08-25T18:53:00+00:00

The last one: 3.20.0 Thank you.

damasovelazquez 2025-08-26T07:01:00+00:00

And WooCommerce Subscriptions version is 7.8.1.

Juan Coronel 2025-08-27T13:30:00+00:00

Hello there, That plugin is paid, so I don’t have access to it. However, try adding the following code to your active theme’s functions.php file: if ( ! function_exists( 'yith_wcaf_commissions_metabox_order_total_fix' ) ) { function yith_wcaf_commissions_metabox_order_total_fix( $total, $order ) { $total = $order instanceof WC_Order ? $order->get_total() : 0; return $total; } add_filter( 'yith_wcaf_commissions_metabox_order_total', 'yith_wcaf_commissions_metabox_order_total_fix', 99, 2 ); } Could you check it, please? Best regards.

damasovelazquez 2025-08-27T14:39:00+00:00

Hello, thank you very much for reviewing this error. I have tried the code you sent me, but I am still getting the same error. Any ideas? Thank you very much.

Juan Coronel 2025-08-29T13:10:00+00:00

Hello there, Could you confirm for me that the first line of the error has the number 40 at the end like this? [25-Aug-2025 06:07:03 UTC] PHP Fatal error: Uncaught Error: Call to a member function get_total() on bool in /home/web01/public_html/wp-content/plugins/yith-woocommerce-affiliates/views/meta-boxes/referral-commissions-metabox.php:40 Let us know. Best regards.

damasovelazquez 2025-08-29T15:44:00+00:00

Yes. I confirm it..

Juan Coronel 2025-09-03T12:53:00+00:00

Hello there, Please in the line 40 of the following file: \wp-content\plugins\yith-woocommerce-affiliates\includes\admin\meta-boxes\class-yith-wcaf-order-referral-commissions-meta-box.php add the following code: if ( ! $order || ! $order instanceof WC_Order ) { return; } Could you check it, please? If it works correctly, we will include that change in the next version of the plugin. Best regards.

damasovelazquez 2025-09-04T06:43:00+00:00

Solved, mate. I’m waiting for that new version. Thank you very much for your work.

Juan Coronel 2025-09-05T13:31:00+00:00

Hello there, you’re welcome! We’ve just added the change to the plugin, and it will be available in the next version (3.22.0). Best regards.

damasovelazquez 2025-09-05T14:20:00+00:00

Thank you! Best regards.