Run PHP code as WP CLI eval-file command
PHP code to execute with WP CLI. The '<?php ' prefix is optional.
cy.wpCliEval('<?php for($i=0; $i<10; $i++) { echo $i; }').then(response=>{ const output = response.stdout; // Do whatever with the output.}) Copy
cy.wpCliEval('<?php for($i=0; $i<10; $i++) { echo $i; }').then(response=>{ const output = response.stdout; // Do whatever with the output.})
Run PHP code as WP CLI eval-file command