You can hook into the action like this:
Code:
add_action( 'woocommerce_after_shop_loop_item', 'wpse124226_wc_product_attribute_list' );
function wpse124226_wc_product_attribute_list() {
$value = get_the_terms( $product->id, 'pa_package');
echo "<ul>";
foreach ( $value as $values ) {
echo "<li>";
echo $values->name;
echo "</li>";
}
echo "</ul>";
}
Take a look at the codex Plugin API to inform yourself about using hooks. BTW you can use woocommerce functions to get the attributes, especially get_attributes, take a look at the source at the woocommerce documentation. For an use-case take a look at the product-attributes.php file.
Related Posts:
- category_name not working (not showing up in sql query debug)
- What happens when two plugins have the same 3rd party class included into them?
- add_rewrite_rule, plugin activation and plugin deactivation
- Allowing Custom Capability to Manage Plugin Options
- wp_insert_user – how to send verification email before logging in
- Custom plugin settings: clicking “save changes” does not display success message
- WordPress Hook that will run when media file deleted
- Prevent multisite sites from using a plugin
- Plugins won’t auto-update on IIS
- Get the current taxonomy product category title in woocommerce
- Custom Post Type causes Page Not Found
- Detect if a plugin was included in a certain page
- How can I make the “Preview Post” button save and preview in the same window?
- Admin page: form with enctype=”multipart/form-data” does not transfer its data
- how to load tinymce external plugin
- Organising the plugins folder in wordpress
- How Can I Pass the Shortcode’s $atts Variable to the Plugin’s Javascript Function
- Weird problems after recovery from security breach
- How to retrieve custom meta term of category taxonomy from WP Rest API?
- Reset WordPress website
- Problem with wp_enqueue_scripts in plugin
- Building a store locator with google maps
- Runng Cron Job for Plugin With No CronTab Access
- Creating a social media score plugin
- google conversion code
- myCRED custom hook preferences doesn’t update creds and log
- How to create custom tables in WordPress using my own plugin?
- How can I create a custom shortcode that will return a custom post type by ID?
- importing plugin w/ settings from one WP installation to another
- After plugin options changed hook
- New to wordpress, Question about editing PHP
- Plugin: Google Analytics for Dashboard error – Timestamp is too far from current time
- Linking an image to open a youtube video in lightbox/fancybox in wordpress
- How to modify WCMP Rest API response?
- posts comments goes to trash
- User registration
- Show meta box only when post is being published first time
- WP plugins for Product web catalog [closed]
- User Signup in Multisite – Need Plugin or Advice
- Plugin – Social media share buttons
- I need help locating a URL that is on my site map, but that I can’t find in my WordPress dashboard
- Localize plugin name
- Timber – Twig post.content returns null can’t create ACF Gutenberg blocks
- How to create multiple users at once?
- Notice: Uninitialized string offset: 0 in social sharing mu-plugin
- Adding Static Image to WooCommerce Content-Single-Product template
- Remove timthumb.php from my custom theme
- how can I query all wordpress users of a blog
- Automate paragraphs in a post page to have a unique anchor link
- Automatically download, install and activate plugins that my plugin depends, how?
- Error in pdf generating plugin using FPDF
- How to create WordPress custom end point with multiple parameters?
- Text change in Advanced Customs Fields [closed]
- After updating the WordPress getting a syntax error in the console
- How to use apply_filters?
- Call a function for social sharing
- How can I get someone to checkout as soon as they add a product to cart?
- Displaying syntax highlighted code [closed]
- Categories from front-end, checkbox selection doesn’t work
- save data from metabox does not work
- Share buttons Facebook Twitter, just like wordpress.com without webservice
- WordPress not showing manually uploaded files in Uploads folder on Media Library
- Use get_pages() before another plugin modifies it
- How can I adjust my function so the page editor still loads in the backend?
- Why won’t wp_enqueue_script work within any plugin file?
- Preserving existing functionality converting HTML to WordPress
- FTP access to NAS drive files/folders from WordPress site
- Change Jobs for WordPress templates
- Issue calling my functions on Plugin activate in WordPress
- WPGlobus Multilingual – REST API
- Defining constant in a plugin to use in another plugin
- How Can I display Specific User Pages?
- Any way to self-host plugins and update them like wp-hosted plugins does?
- Custom SportsPress list
- Why is the WordPress update_option not working in this code?
- Display Powerpress media url
- Plugin Post 2 Posts: How to list most connected posts?
- wp-admin will not redirect to wp-login.php
- How to set the default options on an existing plugin in a WP MU new user install
- multiple external urls in wordpress website
- Display static pages instead of category, in code
- How to add a filter conditionally based on page related Conditional Tags
- Additional scrollbar appears inside the browser on every page + lag scroll -Winner theme
- Call to a member function get_page_permastruct() on null
- How can I include properly javascript files in my wp plugin [duplicate]
- php include returns 1 as output with other outputs [closed]
- Custom GD Star Ratings Stars [closed]
- How do I transfer my plugin data?
- How to give different user access to different people?
- hide particular category post from front page only [closed]
- How to Replicate Elementor Licensing Model
- How do I save meta key value in the save function?
- Showing Search Engine Results in Elementor [closed]
- Real estate schema markup not showing up on Rich Results test
- qTranslate‑X is not translating all shortcodes
- How do I call an action hook into wp_ajax hook callback function
- /wp-admin/plugins.php takes ages to load, and then 404s
- How to mirror or create a post system into a plugin page
- Problem with a shortcode generating a error [closed]
- Can’t update plugins in WordPress, system returns -1