Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function get_text_for_select_based_on_attribute($attribute) {
- // Find the name of the attribute for the slug we passed in to the function
- $attribute_name = wc_attribute_label($attribute);
- // Create a string for our select
- $select_text = 'Select a ' . $attribute_name;
- // Send the $select_text variable back to our calling function
- return $select_text;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement