Custom Field Is Not Added to Orders
-
Hi,
A while ago YITHEMES provided me with this custom code snippet. It adds the current timestamp to an accepted quote with the field name “accepted_quote_on”. This would happen right after a customer has accepted a quote.
Initially, it was working just fine. However, it doesn’t add the custom field now.
function ywpar_accpeted_quote_set_date( $order_id ) {
$order = wc_get_order( $order_id );
$order -> update_meta_data( 'accepted_quote_on', $order->get_date_modified() );
$order -> save();
}
add_action( 'ywraq_after_order_accepted', 'ywpar_accpeted_quote_set_date', 10 );Here is my system info:
WooCommerce 8.6.1
WordPress 6.4.3
PHP 7.4.33
Request A Quote 4.22.0I tried a few methods, including the troubleshooting mode, but without success! I’m not good with PHP so if anyone could kindly provide any insight, I’ll be thankful!
The page I need help with: [log in to see the link]
- The topic ‘Custom Field Is Not Added to Orders’ is closed to new replies.