Advertisement
Guest User

Untitled

a guest
Aug 23rd, 2015
784
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.36 KB | None | 0 0
  1. function get_text_for_select_based_on_attribute($attribute) {
  2. // Find the name of the attribute for the slug we passed in to the function
  3.     $attribute_name = wc_attribute_label($attribute);
  4.  
  5. // Create a string for our select
  6.     $select_text = 'Select a ' . $attribute_name;
  7.  
  8. // Send the $select_text variable back to our calling function
  9.     return $select_text;
  10. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement