Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions includes/data/mutation/class-checkout-mutation.php
Original file line number Diff line number Diff line change
Expand Up @@ -509,7 +509,7 @@ protected static function validate_checkout( &$data ) {
*
* @return array.
*/
protected function process_order_payment( $order_id, $payment_method ) {
protected static function process_order_payment( $order_id, $payment_method ) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The method process_order_payment is not named in camelCase.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The parameter $order_id is not named in camelCase.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The parameter $payment_method is not named in camelCase.

$available_gateways = WC()->payment_gateways->get_available_payment_gateways();

if ( ! isset( $available_gateways[ $payment_method ] ) ) {
Expand Down Expand Up @@ -538,7 +538,7 @@ protected function process_order_payment( $order_id, $payment_method ) {
*
* @return array
*/
protected function process_order_without_payment( $order_id, $transaction_id = '' ) {
protected static function process_order_without_payment( $order_id, $transaction_id = '' ) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The method process_order_without_payment is not named in camelCase.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The parameter $order_id is not named in camelCase.

$order = wc_get_order( $order_id );
$order->payment_complete( $transaction_id );
wc_empty_cart();
Expand Down