Plugin Directory

Changeset 925245


Ignore:
Timestamp:
06/02/2014 04:50:41 PM (12 years ago)
Author:
nicoss01
Message:

v 1.0.1

Location:
loi-hamon/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • loi-hamon/trunk/readme.txt

    r925136 r925245  
    44Requires at least: 3.0.1
    55Tested up to: 3.9
    6 Stable tag: 1.0
     6Stable tag: 1.0.1
    77License: GPLv2 or later
    88License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    2323- Ajout d'un bloc "délai de livraison" sur chaque produit (admin et front)
    2424- Envoi d'un email de confirmation de demande de rétractation
     25- Vérification de la présence d'une page de CGV (Cela permet d'avoir la validation des CGV à chaque commande)
    2526
    2627Pour une formation wordpress, contactez http://www.devictio.fr/internet/formation-wordpress-lyon.php
  • loi-hamon/trunk/woo_loi_hamon.php

    r925130 r925245  
    33 * Plugin Name: Woocommerce - Loi Hamon
    44 * Depends: Woocommerce
    5  * Plugin URI: http://www.devictio.fr
     5 * Plugin URI: http://www.erreurs404.net
    66 * Description: Ce plugin permet de mettre en place facilement certaines obligations de la loi Hamon 2014
    77 * Version: 1.0.0
    8  * Author: Devictio
    9  * Author URI: http://www.devictio.fr
     8 * Author: Nicolas Grillet
     9 * Author URI: http://www.erreurs404.net
    1010 * License: details de la license
    1111 */
     
    2525        global $woocommerce;
    2626        // Initiation
     27        add_action( 'admin_init', array( $this, 'init_cgv' ) );
    2728        add_action( 'admin_menu', array( $this, 'ajout_du_lien_admin' ) );
    2829        add_filter( 'woocommerce_available_payment_gateways',array( $this, 'ajout_texte_lien' ) );
     
    3940        add_filter( 'woocommerce_email_footer_text',array($this,'cgv_pied_email'));
    4041    }
     42    public function init_cgv(){
     43        if(wc_get_page_id('terms')==-1){
     44            add_action( 'admin_notices', array($this,'alerte_cgv') );
     45        }       
     46    }
     47    public function alerte_cgv() {
     48        ?>
     49        <div class="error">
     50            <p>Vous devez créer une page de <strong>Conditions Générales de Ventes</strong> et la paramètrer dans Woocommerce <a href="admin.php?page=wc-settings&tab=checkout#woocommerce_terms_page_id">ici</a></p>
     51        </div>
     52        <?php
     53    }
    4154    public function cgv_pied_email($content) {
    4255        $cp = get_post(wc_get_page_id('terms'));
Note: See TracChangeset for help on using the changeset viewer.