WooCommerce Local Pickup Plus does not show pickup location and address on the thank you page (Order details)

Viewed 20

I am using the Divi theme with WooCommerce and WooCommerce Local Pickup Plus. I did all the settings correctly according to the documentation.

When the order is placed a Thank You page appears where I display the order details. This is Local Pickup Plus order detail code

<?php
/**
 * WooCommerce Local Pickup Plus
 * @author      SkyVerge
 * @copyright   Copyright (c) 2012-2022, SkyVerge, Inc.
 * @license     http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License v3.0
 */

defined( 'ABSPATH' ) or exit;

/**
 * WooCommerce Local Pickup Plus order pickup details template file.
 *
 * @type \WC_Order $order Order being displayed
 * @type array $pickup_data Pickup data for given order
 * @type \WC_Shipping_Local_Pickup_Plus $shipping_method Local Pickup Plus Shipping Method instance
 *
 * @version 2.0.0
 * @since 2.0.0
 */

?>
<tr class="wc-local-pickup-plus">
    <th><?php echo esc_html( $shipping_method->get_method_title() ); ?>:</th>
    <td>
        <?php $package_number = 1; ?>
        <?php $packages_count = count( $pickup_data ); ?>
        <?php foreach ( $pickup_data as $pickup_meta ) : ?>

            <div>
                <?php if ( $packages_count > 1 ) : ?>
                    <h5><?php echo sprintf( is_rtl() ? '#%2$s %1$s': '%1$s #%2$s', esc_html( $shipping_method->get_method_title() ), $package_number ); ?></h5>
                <?php endif; ?>

                <?php foreach ( $pickup_meta as $label => $value ) : ?>
                    <?php if ( is_rtl() ) : ?>
                        <small><?php echo wp_kses_post( $value ); ?> <strong>:<?php echo esc_html( $label ); ?></strong></small><br />
                    <?php else : ?>
                        <small><strong><?php echo esc_html( $label ); ?>:</strong> <?php echo wp_kses_post( $value ); ?></small><br />
                    <?php endif; ?>
                <?php endforeach; ?>

                <?php if ( $packages_count > 1 && $package_number <=$packages_count ) : ?>
                    <br />
                <?php endif; ?>

                <?php $package_number++; ?>
            </div>

        <?php endforeach; ?>
    </td>
</tr>

Now the problem is that the $pickup_meta is sending the empty value. It did not display the pickup location or address on the order page when it is successful.

The link for the order page is given https://www.vinnavinna.se/kassa/order-received/2648/?key=wc_order_UId9nKkXOgRVZ

The other issue that I am facing is if I select the local pickup still, I get the error message to enter the address for billing.

enter image description here

1 Answers

Unfortunately, WooCommerceLocal Pickup Plus is not compatible with Divi Page Builder.

When I tried to use Divi builder and add code and place [woocommerce_checkout] it did not work. It works when I chose the default editor and place the shortcut i.e. [woocommerce_checkout]

Related