Changeset 2855020
- Timestamp:
- 01/26/2023 08:41:22 AM (3 years ago)
- Location:
- learning-objects-lms
- Files:
-
- 8 deleted
- 5 edited
- 16 copied
-
tags/1.2.3 (copied) (copied from learning-objects-lms/trunk)
-
tags/1.2.3/include (copied) (copied from learning-objects-lms/trunk/include)
-
tags/1.2.3/include/campi-aggiuntivi-woocommerce.php (copied) (copied from learning-objects-lms/trunk/include/campi-aggiuntivi-woocommerce.php)
-
tags/1.2.3/include/function.php (copied) (copied from learning-objects-lms/trunk/include/function.php) (4 diffs)
-
tags/1.2.3/include/interfaccie-amministrative.php (copied) (copied from learning-objects-lms/trunk/include/interfaccie-amministrative.php)
-
tags/1.2.3/include/paypal.php (modified) (1 diff)
-
tags/1.2.3/languages (copied) (copied from learning-objects-lms/trunk/languages)
-
tags/1.2.3/languages/learning-objects-de_DE.mo (deleted)
-
tags/1.2.3/languages/learning-objects-de_DE.po (deleted)
-
tags/1.2.3/languages/learning-objects-en_GB.mo (deleted)
-
tags/1.2.3/languages/learning-objects-en_GB.po (deleted)
-
tags/1.2.3/languages/learning-objects-es_ES.mo (deleted)
-
tags/1.2.3/languages/learning-objects-es_ES.po (deleted)
-
tags/1.2.3/languages/learning-objects-it_IT.mo (deleted)
-
tags/1.2.3/languages/learning-objects-it_IT.po (deleted)
-
tags/1.2.3/languages/learning-objects-lms-de_DE.mo (copied) (copied from learning-objects-lms/trunk/languages/learning-objects-lms-de_DE.mo)
-
tags/1.2.3/languages/learning-objects-lms-de_DE.po (copied) (copied from learning-objects-lms/trunk/languages/learning-objects-lms-de_DE.po)
-
tags/1.2.3/languages/learning-objects-lms-en_GB.mo (copied) (copied from learning-objects-lms/trunk/languages/learning-objects-lms-en_GB.mo)
-
tags/1.2.3/languages/learning-objects-lms-en_GB.po (copied) (copied from learning-objects-lms/trunk/languages/learning-objects-lms-en_GB.po)
-
tags/1.2.3/languages/learning-objects-lms-es_ES.mo (copied) (copied from learning-objects-lms/trunk/languages/learning-objects-lms-es_ES.mo)
-
tags/1.2.3/languages/learning-objects-lms-es_ES.po (copied) (copied from learning-objects-lms/trunk/languages/learning-objects-lms-es_ES.po)
-
tags/1.2.3/languages/learning-objects-lms-it_IT.mo (copied) (copied from learning-objects-lms/trunk/languages/learning-objects-lms-it_IT.mo)
-
tags/1.2.3/languages/learning-objects-lms-it_IT.po (copied) (copied from learning-objects-lms/trunk/languages/learning-objects-lms-it_IT.po)
-
tags/1.2.3/learning-objects-lms.php (copied) (copied from learning-objects-lms/trunk/learning-objects-lms.php) (1 diff)
-
tags/1.2.3/readme.txt (copied) (copied from learning-objects-lms/trunk/readme.txt) (2 diffs)
-
trunk/include/function.php (modified) (4 diffs)
-
trunk/include/paypal.php (modified) (1 diff)
-
trunk/learning-objects-lms.php (modified) (1 diff)
-
trunk/readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
learning-objects-lms/tags/1.2.3/include/function.php
r2657812 r2855020 209 209 210 210 $product_sku = $product->get_sku(); 211 $giornivalidita = intval($product->get_meta('wcloi_scadenza_giorni_text_field_title',true));211 212 212 213 213 //recupero i mesi di validità dagli attributi 214 $attributes = $product->get_attributes(); 214 //Controllo se il prodoto ha un prodotto padre 215 if($product->get_parent_id()){ 216 $product_parent = wc_get_product($product->get_parent_id()); 217 $giornivalidita = intval($product_parent->get_meta('wcloi_scadenza_giorni_text_field_title',true)); 218 219 }else{ 220 $giornivalidita = intval($product->get_meta('wcloi_scadenza_giorni_text_field_title',true)); 221 } 222 223 $attributes = $product->get_attributes(); 215 224 216 225 //Se giorni validità è presente dal meta wcloi_scadenza_giorni_text_field_title non controllo l'attributo … … 234 243 } 235 244 245 //Controllo se il prodoto ha un prodotto padre 246 if($product->get_parent_id()){ 247 $product_parent = wc_get_product($product->get_parent_id()); 248 $product_lo = $product_parent->get_meta('wcloi_prodotto_lo',true); 249 }else{ 250 $product_lo = false; 251 } 252 236 253 //Se il prodotto ha un determinato attributo all'ora fa parte di quelli di LO 237 254 //Oppure se è fleggato il meta wcloi_prodotto_lo 238 255 //Questa doppia casistica serve per gestire il pregresso 239 if ($attributes[WCLOI_ATTRIB_LEARNING_OBJECTS] || $product->get_meta('wcloi_prodotto_lo',true) ) {256 if ($attributes[WCLOI_ATTRIB_LEARNING_OBJECTS] || $product->get_meta('wcloi_prodotto_lo',true) || $product_lo) { 240 257 if(strlen($product_sku) > 0){ 241 258 //Nuova gestione della riga di prodotto … … 264 281 265 282 foreach ($woocommerce->cart->get_cart() as $cart_item_key => $cart_item) { 266 if(get_post_meta( $cart_item['product_id'], 'wcloi_prodotto_ecm', true )){ 267 return true; 268 } 283 284 //Controllo se il prodoto ha un prodotto padre 285 $product = wc_get_product( $cart_item['product_id'] ); 286 287 if($product->get_parent_id()){ 288 $product_parent = wc_get_product($product->get_parent_id()); 289 if(get_post_meta( $product_parent->id, 'wcloi_prodotto_ecm', true )){ 290 return true; 291 } 292 }else{ 293 if(get_post_meta( $cart_item['product_id'], 'wcloi_prodotto_ecm', true )){ 294 return true; 295 } 296 } 269 297 } 270 298 … … 361 389 return $piva; 362 390 } 391 392 //Banner modalità test attiva 393 function wcloi_admin_notice_test() { 394 if('no' !== get_option( 'woocommerce_enable_guest_checkout' )){ 395 ?> 396 <div class="notice notice-warning is-dismissible"> 397 <p>Per il corretto interfacciamento con Learning Objects è necessario togliere la spunta a l'opzione "Permetti ai clienti di effettuare ordini senza un account" che si trova in WooCommerce > impostazioni > Account e privacy</p> 398 </div> 399 <?php 400 } 401 402 if('no' !== get_option( 'woocommerce_registration_generate_password' )){ 403 ?> 404 <div class="notice notice-warning is-dismissible"> 405 <p>Per il corretto interfacciamento con Learning Objects è necessario togliere la spunta a l'opzione "Durante la creazione di un account, genera automaticamente una password dell'account" che si trova in WooCommerce > impostazioni > Account e privacy</p> 406 </div> 407 <?php 408 } 409 } 410 add_action( 'admin_notices', 'wcloi_admin_notice_test' ); 363 411 ?> -
learning-objects-lms/tags/1.2.3/include/paypal.php
r2557556 r2855020 29 29 add_action( 'valid-paypal-standard-ipn-request', 'wcloi_processing_order', 10, 1 ); 30 30 add_action( 'woocommerce_paypal_express_checkout_valid_ipn_request', 'wcloi_processing_order', 10, 1 ); 31 32 function wcloi_stripe_processing_order( $stripe_response, $order ) 33 { 34 if($stripe_response->status == 'succeeded') 35 { 36 //L'ordine passa in completato automaticamente solo se ci sono prodotti LO 37 $order_items = wcloi_get_order_e_learning_product($order); 38 39 if(count($order_items) > 0) 40 { 41 $order->update_status( 'completed' ); 42 } 43 } 44 } 45 46 add_action ('wc_gateway_stripe_process_payment', 'wcloi_stripe_processing_order',10,2); 47 add_action ('wc_gateway_stripe_process_response', 'wcloi_stripe_processing_order',10,2); 48 -
learning-objects-lms/tags/1.2.3/learning-objects-lms.php
r2657812 r2855020 4 4 Plugin URI: https://www.qltech.it/en/learning-objects-woocommerce-lms-plugin/ 5 5 Description: Learning Objects Woocommerce LMS is a plugin for Woocommerce that allows you to connect your shop or website to the professional Learning Objects environment for elearning. 6 Version: 1.2. 26 Version: 1.2.3 7 7 Author: qltechsrl 8 8 Author URI: https://www.qltech.it 9 9 License: GPL-3.0+ 10 10 WC requires at least: 4.8 11 WC tested up to: 5.911 WC tested up to: 7.2 12 12 Text Domain: learning-objects-lms 13 13 Domain Path: /languages -
learning-objects-lms/tags/1.2.3/readme.txt
r2657812 r2855020 3 3 Plugin link: https://www.qltech.it/en/learning-objects-woocommerce-lms-plugin/?utm_source=LPsitoqltech&utm_campaign=Wordpress 4 4 Tags: LMS, elearning, learning management system, woocommerce lms, education, course 5 Tested up to: 5.85 Tested up to: 6.1 6 6 Requires at least: 5.6 7 7 Requires PHP: 7.2 8 Stable tag: 1.2. 28 Stable tag: 1.2.3 9 9 License: GPL-3.0+ 10 10 License URI: https://www.gnu.org/licenses/gpl-3.0.html … … 139 139 140 140 == Changelog == 141 = 1.2.3 [Jan 23, 2023] = 142 * Improved: Minor bug fixes. 143 * Improved: WooCommerce Stripe Checkout Gateway integration 144 141 145 = 1.2.2 [Jan 14, 2022] = 142 146 * Improved: Minor bug fixes. -
learning-objects-lms/trunk/include/function.php
r2657812 r2855020 209 209 210 210 $product_sku = $product->get_sku(); 211 $giornivalidita = intval($product->get_meta('wcloi_scadenza_giorni_text_field_title',true));211 212 212 213 213 //recupero i mesi di validità dagli attributi 214 $attributes = $product->get_attributes(); 214 //Controllo se il prodoto ha un prodotto padre 215 if($product->get_parent_id()){ 216 $product_parent = wc_get_product($product->get_parent_id()); 217 $giornivalidita = intval($product_parent->get_meta('wcloi_scadenza_giorni_text_field_title',true)); 218 219 }else{ 220 $giornivalidita = intval($product->get_meta('wcloi_scadenza_giorni_text_field_title',true)); 221 } 222 223 $attributes = $product->get_attributes(); 215 224 216 225 //Se giorni validità è presente dal meta wcloi_scadenza_giorni_text_field_title non controllo l'attributo … … 234 243 } 235 244 245 //Controllo se il prodoto ha un prodotto padre 246 if($product->get_parent_id()){ 247 $product_parent = wc_get_product($product->get_parent_id()); 248 $product_lo = $product_parent->get_meta('wcloi_prodotto_lo',true); 249 }else{ 250 $product_lo = false; 251 } 252 236 253 //Se il prodotto ha un determinato attributo all'ora fa parte di quelli di LO 237 254 //Oppure se è fleggato il meta wcloi_prodotto_lo 238 255 //Questa doppia casistica serve per gestire il pregresso 239 if ($attributes[WCLOI_ATTRIB_LEARNING_OBJECTS] || $product->get_meta('wcloi_prodotto_lo',true) ) {256 if ($attributes[WCLOI_ATTRIB_LEARNING_OBJECTS] || $product->get_meta('wcloi_prodotto_lo',true) || $product_lo) { 240 257 if(strlen($product_sku) > 0){ 241 258 //Nuova gestione della riga di prodotto … … 264 281 265 282 foreach ($woocommerce->cart->get_cart() as $cart_item_key => $cart_item) { 266 if(get_post_meta( $cart_item['product_id'], 'wcloi_prodotto_ecm', true )){ 267 return true; 268 } 283 284 //Controllo se il prodoto ha un prodotto padre 285 $product = wc_get_product( $cart_item['product_id'] ); 286 287 if($product->get_parent_id()){ 288 $product_parent = wc_get_product($product->get_parent_id()); 289 if(get_post_meta( $product_parent->id, 'wcloi_prodotto_ecm', true )){ 290 return true; 291 } 292 }else{ 293 if(get_post_meta( $cart_item['product_id'], 'wcloi_prodotto_ecm', true )){ 294 return true; 295 } 296 } 269 297 } 270 298 … … 361 389 return $piva; 362 390 } 391 392 //Banner modalità test attiva 393 function wcloi_admin_notice_test() { 394 if('no' !== get_option( 'woocommerce_enable_guest_checkout' )){ 395 ?> 396 <div class="notice notice-warning is-dismissible"> 397 <p>Per il corretto interfacciamento con Learning Objects è necessario togliere la spunta a l'opzione "Permetti ai clienti di effettuare ordini senza un account" che si trova in WooCommerce > impostazioni > Account e privacy</p> 398 </div> 399 <?php 400 } 401 402 if('no' !== get_option( 'woocommerce_registration_generate_password' )){ 403 ?> 404 <div class="notice notice-warning is-dismissible"> 405 <p>Per il corretto interfacciamento con Learning Objects è necessario togliere la spunta a l'opzione "Durante la creazione di un account, genera automaticamente una password dell'account" che si trova in WooCommerce > impostazioni > Account e privacy</p> 406 </div> 407 <?php 408 } 409 } 410 add_action( 'admin_notices', 'wcloi_admin_notice_test' ); 363 411 ?> -
learning-objects-lms/trunk/include/paypal.php
r2557556 r2855020 29 29 add_action( 'valid-paypal-standard-ipn-request', 'wcloi_processing_order', 10, 1 ); 30 30 add_action( 'woocommerce_paypal_express_checkout_valid_ipn_request', 'wcloi_processing_order', 10, 1 ); 31 32 function wcloi_stripe_processing_order( $stripe_response, $order ) 33 { 34 if($stripe_response->status == 'succeeded') 35 { 36 //L'ordine passa in completato automaticamente solo se ci sono prodotti LO 37 $order_items = wcloi_get_order_e_learning_product($order); 38 39 if(count($order_items) > 0) 40 { 41 $order->update_status( 'completed' ); 42 } 43 } 44 } 45 46 add_action ('wc_gateway_stripe_process_payment', 'wcloi_stripe_processing_order',10,2); 47 add_action ('wc_gateway_stripe_process_response', 'wcloi_stripe_processing_order',10,2); 48 -
learning-objects-lms/trunk/learning-objects-lms.php
r2657812 r2855020 4 4 Plugin URI: https://www.qltech.it/en/learning-objects-woocommerce-lms-plugin/ 5 5 Description: Learning Objects Woocommerce LMS is a plugin for Woocommerce that allows you to connect your shop or website to the professional Learning Objects environment for elearning. 6 Version: 1.2. 26 Version: 1.2.3 7 7 Author: qltechsrl 8 8 Author URI: https://www.qltech.it 9 9 License: GPL-3.0+ 10 10 WC requires at least: 4.8 11 WC tested up to: 5.911 WC tested up to: 7.2 12 12 Text Domain: learning-objects-lms 13 13 Domain Path: /languages -
learning-objects-lms/trunk/readme.txt
r2657812 r2855020 3 3 Plugin link: https://www.qltech.it/en/learning-objects-woocommerce-lms-plugin/?utm_source=LPsitoqltech&utm_campaign=Wordpress 4 4 Tags: LMS, elearning, learning management system, woocommerce lms, education, course 5 Tested up to: 5.85 Tested up to: 6.1 6 6 Requires at least: 5.6 7 7 Requires PHP: 7.2 8 Stable tag: 1.2. 28 Stable tag: 1.2.3 9 9 License: GPL-3.0+ 10 10 License URI: https://www.gnu.org/licenses/gpl-3.0.html … … 139 139 140 140 == Changelog == 141 = 1.2.3 [Jan 23, 2023] = 142 * Improved: Minor bug fixes. 143 * Improved: WooCommerce Stripe Checkout Gateway integration 144 141 145 = 1.2.2 [Jan 14, 2022] = 142 146 * Improved: Minor bug fixes.
Note: See TracChangeset
for help on using the changeset viewer.