dimanche 4 octobre 2015

Modify Woocommerce Pluggin Files Outside of Template Folder

I modified the following line of code located in /woocommerce/includes/gateways/bacs/class-wc-gateway-bacs.php so that Account Name and Bank Name have titles and are displayed on separate lines.

if ( $bacs_account->account_name || $bacs_account->bank_name ) {
                    echo '<h3>' . wp_unslash( implode( ' - ', array_filter( array( $bacs_account->account_name, $bacs_account->bank_name ) ) ) ) . '</h3>' . PHP_EOL;
            }

How do I keep my mod from being overwritten with the next WC update?

Here's my modified code:

if ( $bacs_account->account_name || $bacs_account->bank_name ) {
                echo '<h3>' . ' Company Name: ' . wp_unslash( implode( ' <br>Bank Name: ', array_filter( array( $bacs_account->account_name, $bacs_account->bank_name ) ) ) ) . '</h3>' . PHP_EOL;
            }



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire