Plugin Directory

Changeset 2292701


Ignore:
Timestamp:
04/27/2020 03:08:17 PM (6 years ago)
Author:
Sebas2
Message:

Added translation files and version update 0.0.5

Location:
s2-woocommerce-ean/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • s2-woocommerce-ean/trunk/readme.txt

    r2292636 r2292701  
    88License: GPLv2
    99
    10 WordPress plugin to be used with Woocmmerce adds an extra custom field to products
     10WordPress plugin to be used with Woocmmerce adds a extra custom field to products
    1111
    1212== Description ==
     
    1616= Overview =
    1717Adding 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.
     18There is now admin/settings screen.
    1919
    2020= Installation Instructions =
    21211. Upload `s2 Woocommerce EAN` folder to the `/wp-content/plugins/` directory
    22222. Activate the plugin through the 'Plugins' menu in WordPress
     23
     24== Screenshots ==
     25 
     261. GTIN/EAN Field in product
     272. GTIN/EAN Field in product in variable product
    2328
    2429== Changelog ==
     
    4146
    4247* 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  
    44    Plugin URI:
    55    Description: Add EAN/GTIN field to woocommerce products, must have for google Merchant shop
    6     Version: 0.0.4
     6    Version: 0.0.5
    77    Author: Sebas2
    88    Author URI: http://www.sebas2.nl
    99    License: 
     10    Text Domain: s2_woocommerce_ean
    1011*/
    1112if ( ! defined( 'ABSPATH' ) ) {
     
    3940    public function plugin_setup()
    4041    {
     42        add_action( 'init',                                                     array( $this, 's2_woocommerce_textdomain' ) );
     43
    4144        add_action( 'woocommerce_product_options_inventory_product_data',       array( $this, 's2_woocommerce_ean_field'),  1, 1 );
    4245        add_action( 'woocommerce_process_product_meta',                         array( $this, 's2_woocommerce_save_ean_field'),  12, 2 );
     
    6063    }
    6164
     65    public function s2_woocommerce_textdomain (){
     66
     67        load_plugin_textdomain( 's2_woocommerce_ean', false, dirname( plugin_basename( __FILE__ ) ) . '/languages' );
     68
     69    }
    6270
    6371    public function s2_woocommerce_admin_notice() {
     
    6573            ?>   
    6674            <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>
    6876            </div>
    6977            <?php
     
    99107            'name' => 's2_woocommerce_ean_field[' . $loop . ']',
    100108            'class' => 'short s2_woocommerce_ean_field',
    101             'label' => __( 'EAN/gTIN field', 'woocommerce' ),
     109            'label' => __( 'EAN/gTIN field', 's2_woocommerce_ean' ),
    102110            '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' ),
    104112            'value' => get_post_meta( $variation->ID, 's2_woocommerce_ean_field', true ),
    105113            'wrapper_class' => 'form-row form-row-full',
     
    134142        $args = array(
    135143            'id'            => 's2_woocommerce_ean_field',
    136             'label'         => __( 'EAN', 's2_woocommerce_ean_field' ),
     144            'label'         => __( 'EAN', 's2_woocommerce_ean' ),
    137145            'class'         => 's2_woocommerce-ean-field',
    138146            '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' ),
    140148        );
    141149        woocommerce_wp_text_input( $args );
Note: See TracChangeset for help on using the changeset viewer.