I have different plugin for shipping method which is using in my country.
Using MultiStep plugin for checkout and i want to activate shipping page, but right now the buttons for delivery are store in woocommerce-shipping-totals (tfoot).
Can you tell me how to move them to be on bottom of the checkbox for “alternative shipping address”
I try with this function in function.php:
function move_shipping_totals_below_shipping_fields() {
remove_action('woocommerce_review_order_after_cart_contents', 'woocommerce_cart_totals_shipping_html', 10);
add_action('woocommerce_after_checkout_shipping_form', 'woocommerce_cart_totals_shipping_html', 10);
}
add_action('woocommerce_init', 'move_shipping_totals_below_shipping_fields');
It’s placing it inside “Alternative shipping address”, but radio buttons and other fields from plugin “Bulgarisation for WooCommerce” are not working there.
Support for this plugin told me i need to see how to move them from WooCommerce plugin.
Thank you for your time!
Regards, Duck
]]>The field is removed, but I noticed an error. When I add a product and go to the cart page to simulate shipping, the address is shown correctly, but when I go to the checkout page and return to the cart page, the undefined value is added to the address. This only happens because of the removal of address 2.
I’ve already tried using the woocommerce_default_address_fields, woocommerce_billing_fields, woocommerce_shipping_fields and woocommerce_checkout_fields filters. I’ve also disabled plugins that may be related to WooCommerce.
This is the most recent code from my attempts:
add_filter( 'woocommerce_billing_fields' , 'custom_billing_fields' );
function custom_billing_fields( $fields ) {
unset($fields ['billing_company']);
$fields['billing_neighborhood']['label'] = 'Bairro';
$fields['billing_number']['class'] = array( 'form-row-first', 'address-field' );
$fields['billing_phone']['class'] = array( 'form-row-first', 'address-field' );
$fields['billing_cpf']['class'] = array( 'form-row-last', 'person-type-field', 'validate-required' );
$fields['billing_neighborhood']['class'] = array( 'form-row-first', 'address-field' );
$fields['billing_email']['priority'] = 21;
$fields['billing_phone']['priority'] = 22;
$fields['billing_number']['priority'] = 60;
$fields['billing_neighborhood']['priority'] = 75;
$fields['billing_neighborhood']['required'] = true;
return $fields;
}
add_filter( 'woocommerce_shipping_fields' , 'custom_shipping_fields' );
function custom_shipping_fields( $fields ) {
unset($fields ['shipping_company']);
$fields['shipping_neighborhood']['label'] = 'Bairro';
$fields['shipping_number']['class'] = array( 'form-row-first', 'address-field' );
$fields['shipping_neighborhood']['class'] = array( 'form-row-first', 'address-field' );
$fields['shipping_number']['priority'] = 60;
$fields['shipping_neighborhood']['priority'] = 75;
$fields['shipping_neighborhood']['required'] = true;
return $fields;
}
add_filter( 'woocommerce_default_address_fields', 'custom_default_address_fields' );
function custom_default_address_fields( $fields ) {
unset($fields['address_2']);
if(is_account_page() || is_checkout()) {
$fields['postcode']['class'] = array( 'form-row-first', 'address-field' );
$fields['address_1']['class'] = array( 'form-row-last', 'address-field' );
$fields['city']['class'] = array( 'form-row-last', 'address-field' );
$fields['state']['class'] = array( 'form-row-last', 'address-field' );
}
return $fields;
}
I’ve tried using $unset($fields[‘billing_address_2’]); in the ‘woocommerce_billing_fields’ filter, $unset($fields[‘shipping_address_2’]); in the filter ‘woocommerce_shipping_fields’ and $unset($fields[‘billing’][‘billing_address_2’]); $unset($fields[‘shipping’][‘shipping_address_2’]); in the ‘woocommerce_checkout_fields’ filter.
None of the attempts worked. Every time I recalculate in the cart, the address appears correctly (but I noticed that it only asks/shows the city). When I go to the checkout page and return to the cart, the street address is also added, but with the undefined that comes from address 2.
]]>I ask this because my boss has a habit of listing products without entering weights or dimensions which will pick up the lowest shipping cost in our shipping plugin. Whilst not losing out completely on shipping, it would be useful if it was possible to prevent a product being published without having entered information into the shipping fields before publishing.
]]>I’m facing the issue that the shipping fields are missing in the confirmation email. Both, the Customer and the Shop. I only can see them in the WP BackEnd.
I had the same issue with the Checkout Manager from “QuadLayers”.
When I’m using the Checkout Manager from “ThemeHigh” or non at all there is no issue and the shipping fields are exported.
I hope you can help me with this issue because I’m considering purchasing the full version because of the nice UX. But, well it should work
Thanks in Advance,
Eddy
After upgrade to woocommerce 4.9.2 we have problems with the shipping fields.
The order and the obligatory of these fields are no more considered.
No problems with billing and additional fields.
Billing and shipping should have the same order, look at first “Paese” field
Thanks for support
Best Regards,
Sam
First thanks for the plugin, it does than we need.
I’m wondering why shipping fields are missing from the checkout form when Quotes are enabled.
And yes, I’ve Shipping enabled in Woocommerce.
I’m using Storefront as theme. And it only shows very little customer fields.
We need to show at last the shipping address to calcule shipment taxes.
Is it possible?
Regards.
]]>