wordpress plugin - Edited title: Woocommerce create order status that doesn't mark order as uneditable -
wordpress plugin - Edited title: Woocommerce create order status that doesn't mark order as uneditable -
i have created new custom order status in woocommerce install "awaiting shipping calculation", client has products complex , shipping must worked out manually invoice sent.
i followed guide has created custom order status, whenever order has status, order no longer editable
i want new custom status still leave order editable.
edit have changed of details above whole question makes more sense:
turns out taking wrong approach, there function is_editable() in file abstract-wc-order.php
https://github.com/woothemes/woocommerce/blob/master/includes/abstracts/abstract-wc-order.php#l2469
/** * checks if order can edited, utilize on edit order screen * * @access public * @return bool */ public function is_editable() { if ( ! isset( $this->editable ) ) { $this->editable = in_array( $this->get_status(), array( 'pending', 'on-hold', 'auto-draft' ) ); } homecoming apply_filters( 'wc_order_is_editable', $this->editable, $this ); }
if add together new order status array whole thing works way want to, however, update woocommerce, alter overwritten.
is there can set in plugin code add together new status array using filter?
i've been reading filter documentation hours doesn't seem have examples when filter exists within class/
wordpress-plugin woocommerce
Comments
Post a Comment