What do you mean by “additional cost”?
Distance shipping cost works as distance rules, no other costs consider here.
Does this mean there is no way it can be calculated per the number of products in the cart too?
Additional cost according to the number of products in the cart. Let me say if a customer is buying 1 single product from Mumbai, it costs 100lakh for delivery. Also, if the customer is buying 2 products it will charge the same 100 lakh. So I was asking if there is a snippet that will add an additional shipping charge if the customer adds the number of products in their cart. That is if they are buying 2 or more products from Mumbai or any other location, that amount adds t the shipping fee.
NO, product count does not consider here.
Ok, Ok
I need help with this snippet. I implemented it so Vendors cannot upload a product if they don’t choose an attribute. Instead, it forces vendors to select all attributes.
add_filter( 'wcfm_product_custom_attributes', function( $taxonomy_fields, $att_taxonomy ) {
if( isset( $taxonomy_fields[$att_taxonomy] ) && isset( $taxonomy_fields[$att_taxonomy]['options'] ) ) {
if( isset( $taxonomy_fields[$att_taxonomy]['options']['is_active'] ) ) {
$taxonomy_fields[$att_taxonomy]['options']['is_active']['custom_attributes'] = array( 'required' => 1, 'required_message' => 'Attributes are required' );
}
if( isset( $taxonomy_fields[$att_taxonomy]['options']['value'] ) ) {
$taxonomy_fields[$att_taxonomy]['options']['value']['custom_attributes'] = array( 'required' => 1, 'required_message' => 'Attributes are required' );
}
}
return $taxonomy_fields;
}, 50, 2);
I need help with this snippet. I implemented it so Vendors cannot upload a product if they don’t choose an attribute. Instead,
– DO you want to apply this on any particular attribute? If so, then know me “slug” for that attribute.