Make set_order_props_from_data() protected rather than private (#35829)
* Make set_order_props_from_data() protected This enables 3rd parties that extend the order datastore and need to set their own data. For example, Subscriptions * Add changelog entry * return set_order_props_from_data to private visibility * Make init_order_record and get_order_data_for_ids protected Following feedback here: https://github.com/woocommerce/woocommerce/pull/35829#issuecomment-1340528244 * Update changelog entry Co-authored-by: mattallan <matt.allan@automattic.com>
This commit is contained in:
parent
dedbf7b492
commit
e66d335542
|
@ -0,0 +1,4 @@
|
|||
Significance: patch
|
||||
Type: tweak
|
||||
|
||||
Make the OrdersTableDataStore init_order_record() and get_order_data_for_ids() functions protected rather than private
|
|
@ -1027,7 +1027,7 @@ WHERE
|
|||
*
|
||||
* @return void
|
||||
*/
|
||||
private function init_order_record( \WC_Abstract_Order &$order, int $order_id, \stdClass $order_data ) {
|
||||
protected function init_order_record( \WC_Abstract_Order &$order, int $order_id, \stdClass $order_data ) {
|
||||
$order->set_defaults();
|
||||
$order->set_id( $order_id );
|
||||
$filtered_meta_data = $this->filter_raw_meta_data( $order, $order_data->meta_data );
|
||||
|
@ -1347,7 +1347,7 @@ WHERE
|
|||
*
|
||||
* @return \stdClass[]|object|null DB Order objects or error.
|
||||
*/
|
||||
private function get_order_data_for_ids( $ids ) {
|
||||
protected function get_order_data_for_ids( $ids ) {
|
||||
if ( ! $ids ) {
|
||||
return array();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue