Skip to content
This repository has been archived by the owner on Feb 23, 2024. It is now read-only.

Commit

Permalink
TaskList support for non-block themes
Browse files Browse the repository at this point in the history
  • Loading branch information
mikejolley committed Oct 18, 2023
1 parent 659926a commit bdf0de6
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/Domain/Services/OnboardingTasks/ReviewCheckoutTask.php
Original file line number Diff line number Diff line change
Expand Up @@ -110,9 +110,10 @@ public function can_view() {
* @return string
*/
public function get_action_url() {
if ( $this->has_cart_block() ) {
return admin_url( 'site-editor.php?postType=page&postId=' . wc_get_page_id( 'cart' ) . '&focus=cart&canvas=edit' );
}
return admin_url( 'site-editor.php?postType=page&postId=' . wc_get_page_id( 'checkout' ) . '&focus=checkout&canvas=edit' );
$base_url = wc_current_theme_is_fse_theme() ? 'site-editor.php?postType=page&postId=' : 'post.php?action=edit&post=';
$page_id = $this->has_cart_block() ? wc_get_page_id( 'cart' ) : wc_get_page_id( 'checkout' );
$focus = $this->has_cart_block() ? 'cart' : 'checkout';

return admin_url( $base_url . absint( $page_id ) . '&focus=' . $focus . '&canvas=edit' );
}
}

0 comments on commit bdf0de6

Please sign in to comment.