ribosio80
Forum Replies Created
-
Forum: Plugins
In reply to: [WooCommerce] Issue edit user, of change user email change admin emailsorry false issue the issue is this code:
/* Update account email based on woocommerce billing email */ add_action( 'woocommerce_customer_save_address','isa_customer_save_address', 10, 1); function isa_customer_save_address() { global $woocommerce; $user_id = get_current_user_id(); wp_update_user( array ( 'ID' => $user_id, 'user_email' => $_POST['billing_email'] ) ) ; }
with this code if user insert a mail during checkout the account mail change….
but only with the last version work on backend and is an issue… so if i change from backend a user billing mail i found my admin email changed… but normally this function work from frontend so the user is the specific user and the function work… but from backend i am the user so if i edit a user account with one email the function change my email…. how to edit this function for working only with frontend user?
Forum: Plugins
In reply to: [WooCommerce] Issue edit user, of change user email change admin emailthanks! the problem was in the chilt theme!
i have deleted function per function in function.php ??
and i have find the problem in this code
function trustadv_admin_scripts( $hook ) { if ( 'edit.php' != $hook ) { return; } wp_enqueue_script( 'wp-admin-script', get_stylesheet_directory_uri() . '/admin-script.js', array('jquery'), wp_get_theme()->get('Version'), true ); } add_action( 'admin_enqueue_scripts', 'trustadv_admin_scripts' );
if i see inside admin-script.js (a file in child theme) i see
document.addEventListener('DOMContentLoaded', () => { const viewEsiste = document.querySelectorAll('.column-job_actions a._icon-view'); if (viewEsiste) { const posizione = document.querySelectorAll('.column-job_position .listing-details'); for (let i = 0; i < viewEsiste.length; i++) { const bloccoSlug = document.createElement('div'), url = viewEsiste[i].href, last = url.split("/"); blockSlug.className = 'blocco-slug'; blockSlug.innerHTML = '<strong style="color:#2271b1;">Slug:</strong> ' + last[last.length-2]; posizione[i].append(bloccoSlug); } } const notaEsiste = document.querySelectorAll('td.column-spnote'); if (notaEsiste) { const posizione = document.querySelectorAll('.column-job_position .listing-details'); for (let y = 0; y < notaEsiste.length; y++) { const bloccoNota = document.createElement('div'), testoNota = notaEsiste[y].innerHTML; if (testoNota) { bloccoNota.className = 'blocco-nota'; bloccoNota.innerHTML = '<strong style="color:#2271b1;">Note:</strong> ' + testoNota; posizione[y].append(bloccoNota); } } } });
with this code I show the listing slug next to the title of the listing on a plugin for managing advertisements, I also show the admin notes that I insert into the admin panel for each listing.the problem only occurs with the latest version of woocommerce however
Forum: Plugins
In reply to: [WooCommerce] Issue edit user, of change user email change admin emailI have installed 8.4 and work good the problem repeat if i install last version
Forum: Plugins
In reply to: [WooCommerce] Issue edit user, of change user email change admin email