scriptink
Forum Replies Created
-
Sorry, my fault. I found the issuu code from other snips. I disabled it and now it’s working without error.
Thank you so much, Alex, for the guidance.
Regards, & Best Wishes
Thanks Alex for Reply,
Alex I shared you error log. It’s mentioned
‘/plugins/woocommerce/templates/emails/customer-on-hold-order.php’
I am not using any third-party plugin or template for emails.
Major is
PHP message: id was called incorrectly. Order properties should not be accessed directly.and it says
referer: https://*********/wp-admin/admin.php?page=phone-orders-for-woocommerceThat is the reason I shared your error.
might be issue with $order->add_post_meta (‘billing_gst_number’, $gst_data);
I even tried update_meta_data, same issue.
So far, thanks so much for your effort and especially for this plugin.
Regards
Thank you so much for the update.
Nope It’s not working.
I tried the code using set_meta as you suggested, but unfortunately it also shows a PHP Fatal error.
On some little research, I found add_meta_data When I tried, it was working with an error.
// billing_gst_number -> Custom Order Meta / Field TXT // company_gst_number -> Custom Profile Field TXT add_action( 'woocommerce_checkout_create_order', 'update_order_tax_data', 30, 2 ); function update_order_tax_data( $order, $posted_data ) { $user_id = $order->get_customer_id(); // Get user ID if( empty($user_id) || $user_id == 0 ) return; // exit $gst_data = $order->get_meta('billing_gst_number'); // Get TAX number (checking) if( empty($gst_data) ){ $gst_data = get_user_meta( $user_id, 'billing_gst_number', true ); if( empty($gst_data) ) $gst_data = get_user_meta( $user_id, 'company_gst_number', true ); $order->add_meta_data('billing_gst_number', $gst_data); // Save gst number } }But issue that now error with “Phone Orders for WooCommerce”
Error:
AH01071: Got error 'PHP message: id was called incorrectly. Order properties should not be accessed directly. Backtrace: do_action('wp_ajax_phone-orders-for-woocommerce'), WP_Hook->do_action, WP_Hook->apply_filters, WC_Phone_Orders_Main->ajax_gate, WC_Phone_Orders_Admin_Abstract_Page->ajax, WC_Phone_Orders_Add_Order_Page->ajax_create_order, WC_Phone_Orders_Add_Order_Page->create_order, WC_Order->save, WC_Order->status_transition, do_action('woocommerce_order_status_pending_to_on-hold'), WP_Hook->do_action, WP_Hook->apply_filters, WC_Emails::send_transactional_email, do_action_ref_array('woocommerce_order_status_pending_to_on-hold_notification'), WP_Hook->do_action, WP_Hook->apply_filters, WC_Email_New_Order->trigger, WC_Email->get_content, WC_Email_New_Order->get_content_html, wc_get_template_html, wc_get_template, include('/plugins/woocommerce/templates/emails/admin-new-order.php'), do_action('woocommerce_email_order_meta'), WP_Hook->do_action, WP_Hook->apply_filters, WC_Emails->order_meta, apply_filters('woocommerce_email_...PHP message: id was called incorrectly. Order properties should not be accessed directly. Backtrace: do_action('wp_ajax_phone-orders-for-woocommerce'), WP_Hook->do_action, WP_Hook->apply_filters, WC_Phone_Orders_Main->ajax_gate, WC_Phone_Orders_Admin_Abstract_Page->ajax, WC_Phone_Orders_Add_Order_Page->ajax_create_order, WC_Phone_Orders_Add_Order_Page->create_order, WC_Order->save, WC_Order->status_transition, do_action('woocommerce_order_status_pending_to_on-hold'), WP_Hook->do_action, WP_Hook->apply_filters, WC_Emails::send_transactional_email, do_action_ref_array('woocommerce_order_status_pending_to_on-hold_notification'), WP_Hook->do_action, WP_Hook->apply_filters, WC_Email_New_Order->trigger, WC_Email->get_content, WC_Email_New_Order->get_content_html, wc_get_template_html, wc_get_template, include('/plugins/woocommerce/templates/emails/admin-new-order.php'), do_action('woocommerce_email_order_meta'), WP_Hook->do_action, WP_Hook->apply_filters, WC_Emails->order_meta, apply_filters('woocommerce_email_...PHP message: id was called incorrectly. Order properties should not be accessed directly. Backtrace: do_action('wp_ajax_phone-orders-for-woocommerce'), WP_Hook->do_action, WP_Hook->apply_filters, WC_Phone_Orders_Main->ajax_gate, WC_Phone_Orders_Admin_Abstract_Page->ajax, WC_Phone_Orders_Add_Order_Page->ajax_create_order, WC_Phone_Orders_Add_Order_Page->create_order, WC_Order->save, WC_Order->status_transition, do_action('woocommerce_order_status_pending_to_on-hold'), WP_Hook->do_action, WP_Hook->apply_filters, WC_Emails::send_transactional_email, do_action_ref_array('woocommerce_order_status_pending_to_on-hold_notification'), WP_Hook->do_action, WP_Hook->apply_filters, WC_Email_Customer_On_Hold_Order->trigger, WC_Email->get_content, WC_Email_Customer_On_Hold_Order->get_content_html, wc_get_template_html, wc_get_template, include('/plugins/woocommerce/templates/emails/customer-on-hold-order.php'), do_action('woocommerce_email_order_meta'), WP_Hook->do_action, WP_Hook->apply_filters, WC_Emails->order_meta, ...PHP message: id was called incorrectly. Order properties should not be accessed directly. Backtrace: do_action('wp_ajax_phone-orders-for-woocommerce'), WP_Hook->do_action, WP_Hook->apply_filters, WC_Phone_Orders_Main->ajax_gate, WC_Phone_Orders_Admin_Abstract_Page->ajax, WC_Phone_Orders_Add_Order_Page->ajax_create_order, WC_Phone_Orders_Add_Order_Page->create_order, WC_Order->save, WC_Order->status_transition, do_action('woocommerce_order_status_pending_to_on-hold'), WP_Hook->do_action, WP_Hook->apply_filters, WC_Emails::send_transactional_email, do_action_ref_array('woocommerce_order_status_pending_to_on-hold_notification'), WP_Hook->do_action, WP_Hook->apply_filters, WC_Email_Customer_On_Hold_Order->trigger, WC_Email->get_content, WC_Email_Customer_On_Hold_Order->get_content_html, wc_get_template_html, wc_get_template, include('/plugins/woocommerce/templates/emails/customer-on-hold-order.php'), do_action('woocommerce_email_order_meta'), WP_Hook->do_action, WP_Hook->apply_filters, WC_Emails->order_meta, ...', referer: https://*********/wp-admin/admin.php?page=phone-orders-for-woocommerceThank you so much for sharing your time and experience.
Forum: Plugins
In reply to: [Phone Orders for WooCommerce] Clear Logs / Remove LogsHi Alex,
Thank you so much for your attention and reply.
I hope you have a wonderful day.
Kind Regards,
Forum: Fixing WordPress
In reply to: need help for multi-site Google AnalyticI tried this also but not working
<?php
// Set your domain
$siteURL = “http://s-e-o.news”;// Match with the get_site_url function
if($siteurl == get_site_url()) { ?>MY GA CODE
<?php } ?>I Also facing same Problem with W3 Total Cache It not loading font
Forum: Plugins
In reply to: [WordPress Posts Timeline] [Plugin: WordPress Posts Timeline] Suggestionshi hobbsh thanks to give us this small useful plugin…. I really searching for this kind of simple but effective plugin.
I trying to adjust little your plugin as my use and I add
echo '</br><a href="' . post_permalink($post->ID) . '">'; echo 'ReadMore</a>';after timeline_text
so as temporary result I found link to my post.(actually I not master as you people so I not able to get post tittle as link so I just use ReadMore :d ) so if you can help me and show me how it works then it may be good additional also to your this plugin.
Thanks a lot
Pranav
Scriptink.tk