How to modify PHP code by Code Snippets?
-
I have made some change on this admin page to display the real incomes after removing PayPal Transaction Fee.
localhost/wp-admin/edit.php?post_type=shop_order
diff @ wp-content/plugins/woocommerce/includes/admin/class-wc-admin-post-types.php
if ( $the_order->payment_method_title ) { //echo '<small class="meta">' . __( 'Via', 'woocommerce' ) . ' ' . esc_html( $the_order->payment_method_title ) . '</small>'; echo '<small class="meta">' . __( 'Via', 'woocommerce' ) . ' ' . esc_html( $the_order->payment_method_title ) . '<br/>' . esc_html( $the_ord er->order_total - get_post_custom_values("PayPal Transaction Fee", $post->ID)[0] ) . '</small>'; }
My question is how to put this change in Code Snippets to prevent overwrites when WooCommerce upgrades?
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘How to modify PHP code by Code Snippets?’ is closed to new replies.