Issue #3417228: Coding standards and functions replace
Open
requested to merge issue/commerce_checkout_paths-3417228:3417228-coding-standards-and into 8.x-1.x
2 unresolved threads
Closes #3417228
Merge request reports
Activity
110 110 * 111 111 * @param string &$path 112 112 * Path. 113 * 114 * @throws \Drupal\Component\Plugin\Exception\InvalidPluginDefinitionException 115 * @throws \Drupal\Component\Plugin\Exception\PluginNotFoundException 113 116 */ 114 function _commerce_checkout_paths_alter_path(&$path): void { 117 function _commerce_checkout_paths_alter_path(string &$path): void { 115 118 global $user; 116 119 // Get an Order ID by User ID. 117 $order_id = commerce_cart_order_id($user->uid); 120 $order_id = $this->cartProvider->getCart($user->uid); 150 153 * 151 154 * @return string 152 155 * Custom checkout path. 156 * @throws \Drupal\Component\Plugin\Exception\InvalidPluginDefinitionException 157 * @throws \Drupal\Component\Plugin\Exception\PluginNotFoundException 153 158 */ 154 159 function _commerce_checkout_paths_custom_checkout_path(string $page = 'checkout', int $order_id = NULL): string { 155 160 if (empty($order_id)) { 156 161 global $user; 157 162 // Get an Order ID by User ID. 158 $order_id = commerce_cart_order_id($user->uid); 163 $order_id = Drupal::entityTypeManager()->getStorage('commerce_order')->load($user->uid);
Please register or sign in to reply