Back to list of all filter and action hooks for Compatibility with plugin WooCommerce Delivery & Pickup Date Time (free and Pro) by CodeRockz
Description #
Filter to allow providing or changing address data for each pickup location from the CodeRockz Woo Delivery plugin.
Parameters #
$address_data(array) The address data for the selected pickup location.$pickup_location(array) The selected pickup location.
Example #
/**
* Add pickup location addresses for plugin Coderockz WooCommerce Delivery & Pickup Date Time Pro.
*/
function fluidcheckout_add_woodelivery_pro_pickup_locations( $address, $pickup_location_name ) {
// Define addresses for the corresponding pickup locations
$addresses = array(
'Pickup Location 1' => array( // Location name as defined in WooDelivery Pro settings
'company' => 'Main Store',
'address_1' => '123 Main St',
'city' => 'Springfield',
'postcode' => '12345',
'country' => 'US',
),
'Pickup Location 2' => array( // Location name as defined in WooDelivery Pro settings
'company' => 'Second Store',
'address_1' => '123 Second St',
'city' => 'Snowfield',
'postcode' => '12345',
'country' => 'GE',
),
);
return isset( $addresses[ $pickup_location_name ] ) ? $addresses[ $pickup_location_name ] : $address;
}
add_filter( 'fc_pro_woodelivery_pro_pickup_location_address', 'fluidcheckout_add_woodelivery_pro_pickup_locations', 10, 2 );
