Changeset 925245
- Timestamp:
- 06/02/2014 04:50:41 PM (12 years ago)
- Location:
- loi-hamon/trunk
- Files:
-
- 2 edited
-
readme.txt (modified) (2 diffs)
-
woo_loi_hamon.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
loi-hamon/trunk/readme.txt
r925136 r925245 4 4 Requires at least: 3.0.1 5 5 Tested up to: 3.9 6 Stable tag: 1.0 6 Stable tag: 1.0.1 7 7 License: GPLv2 or later 8 8 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 23 23 - Ajout d'un bloc "délai de livraison" sur chaque produit (admin et front) 24 24 - 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) 25 26 26 27 Pour une formation wordpress, contactez http://www.devictio.fr/internet/formation-wordpress-lyon.php -
loi-hamon/trunk/woo_loi_hamon.php
r925130 r925245 3 3 * Plugin Name: Woocommerce - Loi Hamon 4 4 * Depends: Woocommerce 5 * Plugin URI: http://www. devictio.fr5 * Plugin URI: http://www.erreurs404.net 6 6 * Description: Ce plugin permet de mettre en place facilement certaines obligations de la loi Hamon 2014 7 7 * Version: 1.0.0 8 * Author: Devictio9 * Author URI: http://www. devictio.fr8 * Author: Nicolas Grillet 9 * Author URI: http://www.erreurs404.net 10 10 * License: details de la license 11 11 */ … … 25 25 global $woocommerce; 26 26 // Initiation 27 add_action( 'admin_init', array( $this, 'init_cgv' ) ); 27 28 add_action( 'admin_menu', array( $this, 'ajout_du_lien_admin' ) ); 28 29 add_filter( 'woocommerce_available_payment_gateways',array( $this, 'ajout_texte_lien' ) ); … … 39 40 add_filter( 'woocommerce_email_footer_text',array($this,'cgv_pied_email')); 40 41 } 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 } 41 54 public function cgv_pied_email($content) { 42 55 $cp = get_post(wc_get_page_id('terms'));
Note: See TracChangeset
for help on using the changeset viewer.