Changeset 2480965
- Timestamp:
- 02/24/2021 08:00:58 PM (5 years ago)
- Location:
- woo-add-gtin
- Files:
-
- 1 added
- 3 edited
-
assets/icon-256x256.png (added)
-
trunk/includes/class-woo-gtin-functions.php (modified) (2 diffs)
-
trunk/readme.txt (modified) (3 diffs)
-
trunk/woocommerce-gtin.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
woo-add-gtin/trunk/includes/class-woo-gtin-functions.php
r1937074 r2480965 57 57 add_action( 'woocommerce_product_meta_end', array( $this, 'maybe_display_tn' ) ); 58 58 59 add_filter( 'woocommerce_structured_data_product', array( $this, 'add_gtin_to_structured_data' ), 10, 2 ); 60 59 61 } 60 62 … … 209 211 } 210 212 213 function add_gtin_to_structured_data( $markup ) { 214 215 global $product; 216 $product_id = $product->get_id(); 217 $gtin = get_post_meta( $product_id, 'hwp_product_gtin', 1 ); 218 $markup['gtin'] = trim($gtin); 219 return $markup; 220 221 } 222 211 223 } 212 224 -
woo-add-gtin/trunk/readme.txt
r2101229 r2480965 4 4 Tags: woocommerce, upc, ean, gtin, isbn 5 5 Requires at least: 4.5 6 Tested up to: 5. 2.17 Stable tag: 0. 4.06 Tested up to: 5.6.2 7 Stable tag: 0.5.0 8 8 License: GPLv2 or later 9 9 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 30 30 * Option to display GTIN on the single product page 31 31 * Change GTIN to any other text 32 * Add GTIN to structured product data 33 * Works with product feeds like Google Shopping and more (requires a feed plugin) 32 34 33 35 == Installation == … … 40 42 41 43 == Changelog == 44 45 = 0.5.0 = 46 47 * Add structured data 48 * Test with newest versions of WordPress and WooCommerce 42 49 43 50 = 0.4.0 = -
woo-add-gtin/trunk/woocommerce-gtin.php
r1937074 r2480965 4 4 * Plugin URI: http://hollerwp.com 5 5 * Description: Add GTIN including UPC, EAN, and ISBN code fields to your WooCommerce product pages and checkout. 6 * Version: 0. 4.06 * Version: 0.5.0 7 7 * Author: Scott Bolinger 8 8 * Text Domain: woo-add-gtin 9 * WC requires at least: 3.010 * WC tested up to: 3.4.59 * WC requires at least: 4.0 10 * WC tested up to: 5.0.0 11 11 * 12 12 * @author Scott Bolinger … … 64 64 private function setup_constants() { 65 65 // Plugin version 66 define( 'Woo_GTIN_VER', '0. 4.0' );66 define( 'Woo_GTIN_VER', '0.5.0' ); 67 67 68 68 // Plugin path
Note: See TracChangeset
for help on using the changeset viewer.