Override woocommerce ‘core’ file (not template one)
-
Hi,
for various reasons, I have to change a single line in “../wp-content/plugins/woocommerce/includes/admin/class-wc-admin-post-types.php” file.Line is 642.
From:
echo '<a href="#" class="show_order_items">' . apply_filters('woocommerce_admin_order_item_count', sprintf( _n( '%d item', '%d items', $the_order->get_item_count(), 'woocommerce' ), $the_order->get_item_count() ), $the_order) . '</a>';
I would change in:
echo '<a href="#" class="show_order_items">' . apply_filters('woocommerce_admin_order_item_count', sprintf( _n( '%d item', '%d items', count($the_order->get_items()), 'woocommerce' ), count($the_order->get_items()) ), $the_order) . '</a>';
I don’t wont to change the file directly, but use some methods in my child-theme to override the file. I tried various methods, but I couldn’t figure it out..
Please, is there anyone can help me?
Thanks in advance.
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Override woocommerce ‘core’ file (not template one)’ is closed to new replies.