Skip to content

Commit

Permalink
Unit price variable notice styling.
Browse files Browse the repository at this point in the history
  • Loading branch information
dennisnissle committed Jul 25, 2024
1 parent 87ffee6 commit ffe3599
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 10 deletions.
3 changes: 3 additions & 0 deletions assets/css/admin.scss
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,9 @@ span.woocommerce-gzd-input-toggle {
box-sizing: border-box;
display: none;
padding: 5px 12px;
border-left-color: #dba617 !important;
border-left-width: 4px !important;
border-top: none !important;
}

._billing_title_field, ._billing_address_1_field, ._shipping_title_field, ._shipping_address_1_field {
Expand Down
8 changes: 0 additions & 8 deletions assets/js/static/admin-product-variations.js
Original file line number Diff line number Diff line change
Expand Up @@ -148,14 +148,6 @@ jQuery( function ( $ ) {
$( '.variable_pricing_unit .form-row' ).show();
$( '.variable_pricing_unit .wc-gzd-unit-price-disabled-notice' ).hide();
}

var $last = $( '.variable_pricing_unit .form-row:not(.wc-gzd-unit-price-disabled-notice):visible:last' );

if ( $last.length > 0 && $last.hasClass( 'form-row-first' ) ) {
$( '.variable_pricing_unit .wc-gzd-unit-price-disabled-notice' ).removeClass( 'form-row-first' ).addClass( 'form-row-last' );
} else {
$( '.variable_pricing_unit .wc-gzd-unit-price-disabled-notice' ).removeClass( 'form-row-last' ).addClass( 'form-row-first' );
}
}
},

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,7 @@ public static function output( $loop, $variation_data, $variation ) {
)
);
?>
<p class="form-row form-row-first wc-gzd-unit-price-disabled-notice notice notice-warning">
<p class="form-row form-row-full wc-gzd-unit-price-disabled-notice notice notice-warning">
<?php printf( esc_html__( 'To enable unit prices on variation level please choose a unit and unit price units within %s.', 'woocommerce-germanized' ), '<a href="#general_product_data" class="wc-gzd-general-product-data-tab">' . esc_html__( 'general product data', 'woocommerce-germanized' ) . '</a>' ); ?>
</p>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -659,7 +659,6 @@ public function get_mandate_type( $order ) {
* @param $plain_text
*/
public function email_sepa( $order, $sent_to_admin, $plain_text ) {

if ( $this->id !== $order->get_payment_method() ) {
return;
}
Expand Down

0 comments on commit ffe3599

Please sign in to comment.