| @@ 62-71 (lines=10) @@ | ||
| 59 | * so we need to render the endpoint content again. |
|
| 60 | */ |
|
| 61 | if ( ! did_action( 'woocommerce_account_content' ) ) { |
|
| 62 | foreach ( $wp->query_vars as $key => $value ) { |
|
| 63 | if ( 'pagename' === $key ) { |
|
| 64 | continue; |
|
| 65 | } |
|
| 66 | if ( has_action( 'woocommerce_account_' . $key . '_endpoint' ) ) { |
|
| 67 | ob_clean(); |
|
| 68 | do_action( 'woocommerce_account_' . $key . '_endpoint', $value ); |
|
| 69 | break; |
|
| 70 | } |
|
| 71 | } |
|
| 72 | ||
| 73 | _deprecated_function( 'Your theme version of my-account.php template', '2.6', 'the latest version, which supports multiple account pages and navigation, from WC 2.6.0' ); |
|
| 74 | } |
|
| @@ 2103-2113 (lines=11) @@ | ||
| 2100 | function woocommerce_account_content() { |
|
| 2101 | global $wp; |
|
| 2102 | ||
| 2103 | foreach ( $wp->query_vars as $key => $value ) { |
|
| 2104 | // Ignore pagename param. |
|
| 2105 | if ( 'pagename' === $key ) { |
|
| 2106 | continue; |
|
| 2107 | } |
|
| 2108 | ||
| 2109 | if ( has_action( 'woocommerce_account_' . $key . '_endpoint' ) ) { |
|
| 2110 | do_action( 'woocommerce_account_' . $key . '_endpoint', $value ); |
|
| 2111 | return; |
|
| 2112 | } |
|
| 2113 | } |
|
| 2114 | ||
| 2115 | // No endpoint found? Default to dashboard. |
|
| 2116 | wc_get_template( 'myaccount/dashboard.php', array( |
|