There doesn’t seem to be anything wrong with your code. First thing to check is whether it is evaluated at all by adding something like echo "WPSE!!"
in the function and see if that string turns up in the source code.
If it does turn up, the problem must be in get_shop_name
returning empty. That would be a problem with WooCommerce rather than WordPress proper.
If it does not turn up, the problem most likely is that shortcodes are not evaluated at all in the input field where you are using it. Only in the content field and the default text widget shortcodes are evaluated automatically. In other cases you must specify it like this:
add_filter ( 'input_field_name', 'do_shortcode' );)
Related Posts:
- Woocommerce Add Variation Product to Cart from custom link [closed]
- Plugin Development: WPMU or WP?
- Plugin to restrict non-admin user to existing tags
- What are these entries in the database? Looks similar to JSON
- Inherit plugin settings to new site in Multisite
- Add content to /wp-admin/plugin-install.php admin screens
- How to make sure a wp-cron job runs
- Need a function for changing saved post_date or post_date_gmt to relative time in wordpress
- Two embedded gallery in one post
- Open external links in a new window
- How can I change my javascript after it has been enqueued? [closed]
- Can’t use /wp-json/wp/v2/plugins API endpoint even as administrator
- Can plugins become obsolete?
- Customize the Sorting Dropdown in WooCommerce
- Generated Images sizes do not match Media Settings Image Size
- Multisite: Activate plugin for subsites only?
- How to filter content post only on save
- Good website screenshot plugin [closed]
- Capitalize All Titles and Headlines in Chicago Style
- I am trying to match the wpallimport using the Xpath Filter
- Showing Co-Authors on post page
- How do I store information in a dynamic block in WordPress?
- Plugin custom Action Hook not working
- Shortcode doesn’t work if I directly paste its function in a template file?
- Find the URL of the current plugin directory
- How to get the HTML until ?
- How to generate video out of images via WordPress plugin
- How to include a file for admin and 2 pages without being loaded on other parts of the site?
- Is there a hook that is called only once after plugin bulk update process is completed?
- Events Made Easy Plugin – Duplicate Title Tags
- How to send mail to subscribers using wp_mail
- Doubt using $wpbd->get_col for a single column
- Can’t Update, Delete, install Plugin
- Get plugin option in another PHP file
- My Calendar Plugin – add output directly in template file
- NGiNX + PHP5-fpm + CDN Tools (plugin) [closed]
- Woocommerce API HTTP Response 401
- Time consuming callbacks in customizer
- How can I add hyperlink in WP_Error message?
- “Micro-Site” Options
- Output content to the_content before a plugin does
- In the archive widget, how do I sort in between two years?
- Is there a hook to Intercept al urls from a webpage and redirect to a page
- Set plugin-values when creating post via REST-API
- Active class not working on page created by plugin wordpress
- Overriding Parent Theme… will cause plugins failure?
- Is there a way to figure out which action/filter invoked a function?
- Allow customers to download updated versions of software
- How to extract data from ‘edit my profile’ page in WordPress?
- Need to show featured service boxes on my company website
- Plugin retrieving results even after uninstallation
- Edit / Change Jetpack Mobile Theme [closed]
- How to set category correctly for a custom post created by a remote API call?
- How to include files relative to a file’s directory
- .php file for woocommerce edit category? [closed]
- track all external links on blog via username
- How to access OOP plugin function inside themes or other plugin
- Contact Form 7 “non-selectable” options in a drop down [closed]
- How to add custom text editor in add post section?
- Minimalistic schedular
- Using a Plugin to Show/Hide Content after Header?
- Is it possible/advisable to set last stable version to previous version?
- Rename existing cpt and taxonomy with new textdomain
- FacetWP breaks jQuery events
- Getting infinite scrolling working on my custom template
- Filter Content on Ultimate Membership plugin based on the Country Field Form
- How do I display PHP file contents on front end of WordPress?
- How to apply to hide TinyMCE (wp_editor) on button click
- RSS feeds for specific topics
- ob_end_flush(): failed to send buffer of zlib output compression (0) in external php
- Plugins custom table not being created on activation
- Facing Problem with admin-ajax.php URL – Getting 404 with AJAX call
- How to send the featured image of a post to an API?
- jQuery Ajax not loading page with ACF fields
- How can I translate something in my class constructor of my plugin in WordPress?
- Which post/page an image is attached to
- Theme that includes a “core” plugin but the files in theme and child folder ignored
- Use buddypress function outside of plugin
- Woocommerce Attribute price for non-variations
- My wp database has been hacked
- How to create different views for different user roles?
- How can I disable access to plugin settings in wp admin for other roles
- Searchable Semi Random Number Generator on User Profiles
- Save Post Permalink In .txt File
- Change hook to add_action in a plugin class
- Renamed plugin folder and when I changed back nothing was activated
- Tortoise SVN showing ‘Access to ‘/!svn/me” forbidden error.
- Customize CSS for “Swipebox ” lightbox
- Cannot pass variable to page definition
- Best use adding user generated JS/CSS to a theme with a plugin
- How to create an uploads subfolder on a multisite setup?
- API Functions to Register and Show WordPress List Tables
- Multiple level shortcodes
- Getting error of unexpected output during activation
- Jquery UI implementation [closed]
- Wanted: PayPal plugin for WordPress [closed]
- Simple Amazon Affiliate Plugin [closed]
- Why haven’t I see plugins using get_file_data to handle retrieving plugin version?
- Oxygen plugin wordpress stuck in loading sequence forever when trying to edit a page [closed]
- plugin doesn’t retrieve data from database