Skip to content

Commit

Permalink
Fix up based on Mike's feedback:
Browse files Browse the repository at this point in the history
* Made CVC field form-row-last
* Make CC & EC methods abstract
* Change label on add new payment method button
* remove groupings in account settings
  • Loading branch information
justinshreve committed Mar 4, 2016
1 parent e94a60d commit cb68f41
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 10 deletions.
5 changes: 2 additions & 3 deletions includes/gateways/class-wc-payment-gateway-cc.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
* @package WooCommerce/Classes
* @author WooThemes
*/
class WC_Payment_Gateway_CC extends WC_Payment_Gateway {
abstract class WC_Payment_Gateway_CC extends WC_Payment_Gateway {

/**
* Builds our payment fields area - including tokenization fields and the actualy payment fields.
Expand Down Expand Up @@ -42,9 +42,8 @@ public function payment_fields() {
public function form() {
$html = '';
$fields = array();
$cvc_class = '';

$cvc_field = '<p class="form-row form-row-wide">
$cvc_field = '<p class="form-row form-row-last">
<label for="' . esc_attr( $this->id ) . '-card-cvc">' . __( 'Card Code', 'woocommerce' ) . ' <span class="required">*</span></label>
<input id="' . esc_attr( $this->id ) . '-card-cvc" class="input-text wc-credit-card-form-card-cvc" type="text" autocomplete="off" placeholder="' . esc_attr__( 'CVC', 'woocommerce' ) . '" name="' . esc_attr( $this->id ) . '-card-cvc" style="width:100px" />
</p>';
Expand Down
2 changes: 1 addition & 1 deletion includes/gateways/class-wc-payment-gateway-echeck.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
* @package WooCommerce/Classes
* @author WooThemes
*/
class WC_Payment_Gateway_eCheck extends WC_Payment_Gateway {
abstract class WC_Payment_Gateway_eCheck extends WC_Payment_Gateway {

/**
* Builds our payment fields area - including tokenization fields and the actualy payment fields.
Expand Down
7 changes: 1 addition & 6 deletions templates/myaccount/payment-methods.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,6 @@
</tr>
</thead>
<?php foreach ( $saved_methods as $type => $methods ) : ?>
<tr>
<th colspan='3'>
<?php echo esc_html( $types[ $type ] );?>
</th>
</tr>
<?php foreach ( $methods as $method ) : ?>
<tr class="method">
<?php foreach ( wc_get_account_payment_methods_columns() as $column_id => $column_name ) : ?>
Expand Down Expand Up @@ -85,6 +80,6 @@

<?php do_action( 'woocommerce_after_account_payment_methods', $has_methods ); ?>

<a class="button" href="<?php echo esc_url( wc_get_endpoint_url( 'add-payment-method' ) ); ?>"><?php esc_html_e( 'Add New Payment Method', 'woocommerce' ); ?></a>
<a class="button" href="<?php echo esc_url( wc_get_endpoint_url( 'add-payment-method' ) ); ?>"><?php esc_html_e( 'Add Payment Method', 'woocommerce' ); ?></a>

</div>

0 comments on commit cb68f41

Please sign in to comment.