• Resolved he57mi

    (@he57mi)


    Hi there,

    Just downloaded the plugin so very new at it.

    Can you tell me how you modify the label layout so address 1 and address 2 are on separate lines and modify how the text is laid out on the label.

    Thanks

Viewing 1 replies (of 1 total)
  • Plugin Author Dima Pavlenko

    (@dima411)

    I would use the closest layout to your needs, like “Separate Lines” layout, in the plugin settings:

    WooCommerce > Simple Shipping Labels > Recipient tab > Details Layout

    then adjust the code in /admin/admin.php file, within the labels page generation function:

    function generate_shipping_labels_page_html( $orders ) {...}

    above the switch statement:

    switch ( $this->settings['recipient_details_layout'] ) {...}

    you can split the HTML of the address 1 and 2 line:

    <div class="detail-container address"><div contenteditable="true" class="detail<?php echo $this->rtl_css_class($order_address_1) ?>"><?php echo esc_html( $order_address_1 ) . ( (strlen($order_address_2) == 0) ? "" : "&nbsp;" . esc_html( $order_address_2 ) ) ?></div></div>

    Just duplicate this line and remove the address 1 or 2 from one another.

    You can do the same with the layout preview (in plugin settings) in the layouts previews array:

    public $recipient_details_layout_options = array(...);

    • This reply was modified 1 year, 11 months ago by Dima Pavlenko.
Viewing 1 replies (of 1 total)
  • The topic ‘recipient details layout’ is closed to new replies.