In your callback you can create whatever code snippet you need for your tab. A second hook, woocommerceprocessproductmeta, will save the custom field values. The function linked to this hook is responsible for displaying the new fields. If you wanted to target a tab that you named “Limited Edition”, you would change this to $tab instead. The first step is to hook to woocommerceproductoptionsgeneralproductdata. The default behavior gives the snippets priority in all situations. In this example we’re targeting the description tab. Supertab does seem to have some built-in support for snipmate, however. It will pop up a menu to allow for completion. You can create a custom callback function for any tab. 1 Answer Sorted by: 1 You need to use omnifunc to provide the completion. The following is an example that I pulled from the link that you’ll find at the end of my post. If you are trying to add php this will be the most ideal and safe way to do this. Author links open overlay panel William E. Feedrate deviations caused by hopper refill of loss-in-weight feeders. You can check to make sure you’re looking at the correct tab and then add the snippet in. Section snippets References (16) Cited by (70) Recommended articles (6) Powder Technology. Hey you say you need to add a code snippet what type of code are we talking about, php or js?Įither way I suggest using a filter in your themes functions.php file.
0 Comments
Leave a Reply. |