fazarcon

modify price text

Jul 14th, 2022
27
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.31 KB | None | 0 0
  1. add_filter('generateblocks_dynamic_content_output', function($content, $attributes, $block){
  2. if ( !is_admin() && ! empty( $attributes['className'] ) && strpos( $attributes['className'], 'my-price' ) !== false ) {
  3. $text_to_add = '$ ';
  4. $content = $text_to_add . $content;
  5. }
  6.  
  7. return $content;
  8. }, 10, 3);
Advertisement
Add Comment
Please, Sign In to add comment