Hi @mariusfjeldbu,
I get it. The problem with shipping methods, local pickup, and the shipping address subsection is that they all depend on each other.
In your case, the shipping methods depend on the zip code. For other webshops, the shipping address is not relevant if “Local pickup” is selected. So it is the problem of the chicken and the egg.
By default, Fluid Checkout will show the shipping methods first when a “Local pickup” method is available.
Currently, there are no options in the plugin settings that let you change the behavior, however, you can accomplish this by using one of the code snippets below, depending on what fits your needs.
1. You can prevent moving the shipping methods to before the shipping address using the code snippet below:
/**
* Move the shipping methods to after the shipping address.
*/
function fluidcheckout_show_shipping_methods_after_address( $enable_option ) {
remove_action( 'fc_output_step_shipping', array( FluidCheckout_Steps::instance(), 'output_substep_shipping_method' ), 10 );
remove_action( 'fc_output_step_shipping', array( FluidCheckout_Steps::instance(), 'output_substep_shipping_address' ), 20 );
add_action( 'fc_output_step_shipping', array( FluidCheckout_Steps::instance(), 'output_substep_shipping_address' ), 10 );
add_action( 'fc_output_step_shipping', array( FluidCheckout_Steps::instance(), 'output_substep_shipping_method' ), 20 );
}
add_filter( 'wp', 'fluidcheckout_show_shipping_methods_after_address', 200 );
2. Or… you can remove all Local Pickup customizations added by Fluid Checkout with this code snippet:
/**
* Disable Fluid Checkout local pickup features.
*/
function fluidcheckout_disabled_local_pickup_customizations( $enable_option ) {
return 'no';
}
add_filter( 'pre_option_fc_enable_checkout_local_pickup', 'fluidcheckout_disabled_local_pickup_customizations', 10 );
Better support for Local Pickup
We have plans to add better support for “Local pickup” on the PRO version, but that will take some time to be ready.
Customization
For your “ideal world” scenario, as you described it, you can certainly accomplish that with a customized solution.
To inquire about customizations, please send us a message at support [at] fluidcheckout.com.
As an alternative, although we are lacking in the documentation about the plugin, the code is really easy to go through and any developer experienced in WooCommerce would be able to make it work for you.
I hope that helps already ??
Best,
Diego