Unverified Commit 4b187e70 authored by Peter J. Herrel's avatar Peter J. Herrel
Browse files

fix failing tests

closes #94
parent 0b4fb4fc
......@@ -36,20 +36,20 @@ class Api {
if ( ! in_array( $func, $this->functions ) )
return \WP_CLI::error( "$func is not a Polylang API function." );
$this->debug_backtrace = debug_backtrace( DEBUG_BACKTRACE_IGNORE_ARGS, 3 );
\WP_CLI::debug(
sprintf(
"Calling %s::__call('%s') from %s::%s with %d args: %s",
$this->debug_backtrace[1]['class'],
$this->debug_backtrace[1]['function'],
$this->debug_backtrace[2]['class'],
$this->debug_backtrace[2]['function'],
count( $args ),
json_encode( $args )
),
__NAMESPACE__
);
// $this->debug_backtrace = debug_backtrace( DEBUG_BACKTRACE_IGNORE_ARGS, 3 );
//
// \WP_CLI::debug(
// sprintf(
// "Calling %s::__call('%s') from %s::%s with %d args: %s",
// $this->debug_backtrace[1]['class'],
// $this->debug_backtrace[1]['function'],
// $this->debug_backtrace[2]['class'],
// $this->debug_backtrace[2]['function'],
// count( $args ),
// json_encode( $args )
// ),
// __NAMESPACE__
// );
// \WP_CLI::debug( ( new \Exception() )->getTraceAsString() );
......
......@@ -259,7 +259,7 @@ class TermCommand extends BaseCommand {
# sync taxonomies and post meta, if applicable
$sync = new \PLL_Admin_Sync( $this->pll );
$sync->pll_save_term( $term_id, $taxonomy, $this->api->get_term_translations( $term_id ) );
$sync->sync_term_parent( $term_id, $taxonomy, $this->api->get_term_translations( $term_id ) );
# success message
$msg = $exists
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment