Skip to content

Commit

Permalink
Merge pull request #30 from wuunder/line+value-fix
Browse files Browse the repository at this point in the history
Line+value fix
  • Loading branch information
TimD90 authored Oct 2, 2019
2 parents accf0eb + 4da5445 commit 7609865
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions includes/wcwuunder-create.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public function wcwp_sample_admin_notice__error() {
*/
private function wcwp_setBookingConfig($orderId ) {
wcwp_log( 'info', 'Filling the booking config' );

$orderItems = $this->wcwp_get_order_items( $orderId );

$order = new WC_Order( $orderId );
Expand Down Expand Up @@ -101,14 +101,14 @@ private function wcwp_setBookingConfig($orderId ) {

foreach ( $orderItems['products'] as $item ) {
$totalWeight += $item['total_weight'];
$description .= '- ' . $item['quantity'] . 'x ' . $item['name'] . ' \r\n';
$description .= '- ' . $item['quantity'] . 'x ' . $item['name'] . "\r\n";
}

if ( 3 !== count( $dimensions ) ) {
$dimensions = array( null, null, null );
}

$value = intval( $order->get_subtotal() * 100 );
$value = intval(($order->get_total() + $order->get_total_discount() - $order->get_shipping_total()) * 100);

$bookingToken = uniqid();
update_post_meta( $orderId, '_wuunder_label_booking_token', $bookingToken );
Expand Down Expand Up @@ -447,7 +447,7 @@ public function wcwp_add_listing_actions($order ) {
$target = ' target="_blank" ';
?>
<a
<?php
<?php
echo $target; ?>href=" <?php echo $data['url']; ?>" class="<?php echo $data['action']; ?> button tips <?php echo $action; ?>" style="background:#8dcc00; height:2em; width:2em; padding:3px;" alt="<?php echo $data['title']; ?>" data-tip="<?php echo $data['title']; ?>">
<img src="<?php echo $data['img']; ?>" style="width:18px; margin: 4px 3px;"
alt="<?php echo $data['title']; ?>">
Expand Down

0 comments on commit 7609865

Please sign in to comment.