Skip to content

Instantly share code, notes, and snippets.

@curtismchale
Last active August 29, 2015 14:04
Show Gist options
  • Select an option

  • Save curtismchale/3a49cf26cdffe2113f72 to your computer and use it in GitHub Desktop.

Select an option

Save curtismchale/3a49cf26cdffe2113f72 to your computer and use it in GitHub Desktop.
<?php
/**
* Allows you to change the default message for variable products.
*
* @param string $message stock Easy Content Restriction message
* @param int $product_id The post_id for the product the message would be tied to, may be a product variation id
* @return string Your custom message
*/
function change_variable_product_message( $message, $product_id ) {
return 'Our custom message';
}
add_filter( 'wecr_variable_product_message', 'change_variable_product_message' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment