igianni84
Forum Replies Created
-
Forum: Plugins
In reply to: [NS Cloner - Site Copier] Duplication not work via APIHi, I sent you emails two weeks ago, but I have not received a reply. (yet I have the PRO version)
Forum: Plugins
In reply to: [WooCommerce] Problem with add attributes via update_post_metaThanks for the reply Gabriel. I also asked in the community on facebook hoping to receive feedback. Hope to get it here too ??
Hi thanks for your support. I have send admin data via email.
UM 2.1.20
No customization??
Hi, I tried to update the user with the “[Rinnovato]Emilia Romagna” role again, but it doesn’t work. I also cleared the cache. I have disabled all plugins. But nothing to do …
Yes, the users have all registered from the registration form ??
I solved it by changing plugin ?? Unfortunately I didn’t get any response …
Thanks! Now it’s ok!
Forum: Plugins
In reply to: [WooCommerce] Big latency with webhooksThanks for the super fast response. Would there be a way to see the queue?
Because it seems strange to me that there is a 20 minute queue on a newly created site (on WordPress Multisite installation).
Forum: Plugins
In reply to: [NS Cloner - Site Copier] How to clone via APIThanks for the reply. I understand you … you cannot give assistance on custom codes. But I’m trying to use your own example code, but it doesn’t work.
Obviously this file of mine is just an example that I will delete as soon as I can get it working.
Forum: Plugins
In reply to: [NS Cloner - Site Copier] How to clone via APIHi, unfortunately I can’t duplicate sites via api. My code is as follows:
<?php /* Come categoria sito usare uno dei seguenti codici: 9 => Sito abbigliamento 2 => Sito casalinghi 3 => Sito elettronica 4 => Altro */ require_once('wp-load.php'); /* $nome_sito = $_POST['nome_sito']; $email_cliente = $_POST['email_cliente']; $categoria_sito = $_POST['categoria_sito']; //l'id del sito da copiare $descrizione_sito = $_POST['descrizione_sito']; //il title del sito */ $request = array( 'clone_mode' => 'core', 'source_id' => 9,//$categoria_sito, 'target_name' => "ciao2",//$nome_sito, 'target_title' => "questa è una prova",//$descrizione_sito, 'debug' => 1 // optional: enables logs ); // Register request with the cloner. foreach ( $request as $key => $value ) { ns_cloner_request()->set( $key, $value ); } // Get the cloner process object. $cloner = ns_cloner()->process_manager; // Begin cloning. $cloner->init(); // Check for errors (from invalid params, or already running process). $errors = $cloner->get_errors(); if ( ! empty( $errors ) ) { // Handle error(s) and exit } // Last you'll need to poll for completion to run the cleanup process // when content is done cloning. Could be via AJAX to avoid timeout, or like: do { // Attempt to run finish, if content is complete. $cloner->maybe_finish(); $progress = $cloner->get_progress(); // Pause, so we're not constantly hammering the server with progress checks. sleep( 3 ); } while ( 'reported' !== $progress['status'] ); // Once you've verified that $progress['status'] is 'reported', // you can get access the array of report data (whether successful or failed) via: $reports = ns_cloner()->report->get_all_reports(); print_r($reports);
If I run this script (you can check by going to https://negozioperfetto.com/cloner.php), it times out after a few minutes.
Why?
Forum: Plugins
In reply to: [NS Cloner - Site Copier] How to clone via APIOkay, fine thanks. Could you just tell me how I can also associate a user in the site duplication API? What value should I add inside the request array?
$request = array( 'clone_mode' => 'core', 'source_id' => $categoria_sito, 'target_name' => $nome_sito, 'target_title' => $descrizione_sito, 'debug' => 1 // optional: enables logs );
Forum: Plugins
In reply to: [NS Cloner - Site Copier] How to clone via APIThanks! I have another question: where is a complete documentation about API? I need to know how do I do assign an user to a website during the cloning… how do I delete a site, etc…
P.S. I bought the PRO version ??
Thanks
Forum: Plugins
In reply to: [NS Cloner - Site Copier] How to clone via APIHi, I’ve done some tests and it doesn’t seem to work. I used the following code, but it gives me a generic error (wordpress has stopped working). In the log file I read:
[20-Oct-2020 08:02:26 UTC] PHP Fatal error: Uncaught Exception: Access denied. in /var/www/vhosts/negozioperfetto.com/httpdocs/wp-content/plugins/elementor/core/settings/page/manager.php:105 Stack trace: #0 /var/www/vhosts/negozioperfetto.com/httpdocs/wp-content/plugins/elementor/core/base/document.php(1214): Elementor\Core\Settings\Page\Manager->ajax_before_save_settings(Array, 2037) #1 /var/www/vhosts/negozioperfetto.com/httpdocs/wp-content/plugins/elementor/core/base/document.php(609): Elementor\Core\Base\Document->save_settings(Array) #2 /var/www/vhosts/negozioperfetto.com/httpdocs/wp-content/plugins/elementor/core/kits/manager.php(186): Elementor\Core\Base\Document->update_settings(Array) #3 /var/www/vhosts/negozioperfetto.com/httpdocs/wp-content/plugins/elementor/core/kits/manager.php(274): Elementor\Core\Kits\Manager->update_kit_settings_based_on_option('site_name', 'desc') #4 /var/www/vhosts/negozioperfetto.com/httpdocs/wp-includes/class-wp-hook.php(289): Elementor\Core\Kits\Manager->Elementor\Core\Kits\{closure}('Il mio negozio ...', 'desc') # in /var/www/vhosts/negozioperfetto.com/httpdocs/wp-content/plugins/elementor/core/settings/page/manager.php on line 105 [20-Oct-2020 08:04:42 UTC] PHP Notice: Undefined variable: pm in /var/www/vhosts/negozioperfetto.com/httpdocs/cloner.php on line 53 [20-Oct-2020 08:04:42 UTC] PHP Fatal error: Uncaught Error: Call to a member function maybe_finish() on null in /var/www/vhosts/negozioperfetto.com/httpdocs/cloner.php:53 Stack trace: #0 {main} thrown in /var/www/vhosts/negozioperfetto.com/httpdocs/cloner.php on line 53
<?php require_once('wp-load.php'); $nome_sito = "nome1"; $email_cliente = "[email protected]"; $categoria_sito = 9; //l'id del sito da copiare $descrizione_sito = "desc"; //il title del sito $request = array( 'clone_mode' => 'core', 'source_id' => $categoria_sito, 'target_name' => $nome_sito, 'target_title' => $descrizione_sito, 'debug' => 1 // optional: enables logs ); // Register request with the cloner. foreach ( $request as $key => $value ) { ns_cloner_request()->set( $key, $value ); } // Get the cloner process object. $cloner = ns_cloner()->process_manager; // Begin cloning. $cloner->init(); // Check for errors (from invalid params, or already running process). $errors = $cloner->get_errors(); if ( ! empty( $errors ) ) { // Handle error(s) and exit } // Last you'll need to poll for completion to run the cleanup process // when content is done cloning. Could be via AJAX to avoid timeout, or like: do { // Attempt to run finish, if content is complete. $pm->maybe_finish(); $progress = $pm->get_progress(); // Pause, so we're not constantly hammering the server with progress checks. sleep( 5 ); } while ( 'reported' !== $progress['status'] ); // Once you've verified that $progress['status'] is 'reported', // you can get access the array of report data (whether successful or failed) via: $reports = ns_cloner()->report->get_all_reports(); print_r($reports);
Can you help me?
Forum: Plugins
In reply to: [NS Cloner - Site Copier] How to clone via APIThanks!
Hi, thanks, we’re almost there… It seems that some fields are still displayed incorrectly -> https://imgur.com/a/NmnWiLJ