Changeset 2292701
- Timestamp:
- 04/27/2020 03:08:17 PM (6 years ago)
- Location:
- s2-woocommerce-ean/trunk
- Files:
-
- 2 edited
-
readme.txt (modified) (3 diffs)
-
s2_woocommerce_ean.php (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
s2-woocommerce-ean/trunk/readme.txt
r2292636 r2292701 8 8 License: GPLv2 9 9 10 WordPress plugin to be used with Woocmmerce adds a nextra custom field to products10 WordPress plugin to be used with Woocmmerce adds a extra custom field to products 11 11 12 12 == Description == … … 16 16 = Overview = 17 17 Adding a custom EAN field to your woocommerce products, will help you create your Google Merchant feed. This plugin will not create the feed for you, but the custom field is mandatory. 18 There is no admin/settings screen.18 There is now admin/settings screen. 19 19 20 20 = Installation Instructions = 21 21 1. Upload `s2 Woocommerce EAN` folder to the `/wp-content/plugins/` directory 22 22 2. Activate the plugin through the 'Plugins' menu in WordPress 23 24 == Screenshots == 25 26 1. GTIN/EAN Field in product 27 2. GTIN/EAN Field in product in variable product 23 28 24 29 == Changelog == … … 41 46 42 47 * Fixed sanitazion 48 49 = 0.0.5 = 50 51 * Added translations for nl_NL and en_US 52 -
s2-woocommerce-ean/trunk/s2_woocommerce_ean.php
r2292600 r2292701 4 4 Plugin URI: 5 5 Description: Add EAN/GTIN field to woocommerce products, must have for google Merchant shop 6 Version: 0.0. 46 Version: 0.0.5 7 7 Author: Sebas2 8 8 Author URI: http://www.sebas2.nl 9 9 License: 10 Text Domain: s2_woocommerce_ean 10 11 */ 11 12 if ( ! defined( 'ABSPATH' ) ) { … … 39 40 public function plugin_setup() 40 41 { 42 add_action( 'init', array( $this, 's2_woocommerce_textdomain' ) ); 43 41 44 add_action( 'woocommerce_product_options_inventory_product_data', array( $this, 's2_woocommerce_ean_field'), 1, 1 ); 42 45 add_action( 'woocommerce_process_product_meta', array( $this, 's2_woocommerce_save_ean_field'), 12, 2 ); … … 60 63 } 61 64 65 public function s2_woocommerce_textdomain (){ 66 67 load_plugin_textdomain( 's2_woocommerce_ean', false, dirname( plugin_basename( __FILE__ ) ) . '/languages' ); 68 69 } 62 70 63 71 public function s2_woocommerce_admin_notice() { … … 65 73 ?> 66 74 <div class="notice notice-warning"> 67 <p><?php _e('(S2_woocommerce_EAN) we need Woocommerce to be installed.', ' textdomain') ?></p>75 <p><?php _e('(S2_woocommerce_EAN) we need Woocommerce to be installed.', 's2_woocommerce_ean') ?></p> 68 76 </div> 69 77 <?php … … 99 107 'name' => 's2_woocommerce_ean_field[' . $loop . ']', 100 108 'class' => 'short s2_woocommerce_ean_field', 101 'label' => __( 'EAN/gTIN field', ' woocommerce' ),109 'label' => __( 'EAN/gTIN field', 's2_woocommerce_ean' ), 102 110 'desc_tip' => true, 103 'description' => __( 'Gebruik dit veld voor de EAN code van een product.', 's2_woocommerce_ean _field' ),111 'description' => __( 'Gebruik dit veld voor de EAN code van een product.', 's2_woocommerce_ean' ), 104 112 'value' => get_post_meta( $variation->ID, 's2_woocommerce_ean_field', true ), 105 113 'wrapper_class' => 'form-row form-row-full', … … 134 142 $args = array( 135 143 'id' => 's2_woocommerce_ean_field', 136 'label' => __( 'EAN', 's2_woocommerce_ean _field' ),144 'label' => __( 'EAN', 's2_woocommerce_ean' ), 137 145 'class' => 's2_woocommerce-ean-field', 138 146 'desc_tip' => true, 139 'description' => __( 'Gebruik dit veld voor de EAN code van een product.', 's2_woocommerce_ean _field' ),147 'description' => __( 'Gebruik dit veld voor de EAN code van een product.', 's2_woocommerce_ean' ), 140 148 ); 141 149 woocommerce_wp_text_input( $args );
Note: See TracChangeset
for help on using the changeset viewer.