mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-08-30 05:00:51 +08:00
Fix standalone increment issues
This commit is contained in:
parent
e2fb54c7a9
commit
4c9ca19ec8
3 changed files with 9 additions and 9 deletions
|
@ -260,7 +260,7 @@ class SubscriptionsApiHandler {
|
|||
1
|
||||
) )->to_array();
|
||||
|
||||
$sequence++;
|
||||
++$sequence;
|
||||
}
|
||||
|
||||
$interval = $product->get_meta( '_subscription_period' );
|
||||
|
|
|
@ -109,7 +109,7 @@ class SessionHandler {
|
|||
*
|
||||
* @return string
|
||||
*/
|
||||
public function bn_code() : string {
|
||||
public function bn_code(): string {
|
||||
$this->load_session();
|
||||
|
||||
return $this->bn_code;
|
||||
|
@ -120,7 +120,7 @@ class SessionHandler {
|
|||
*
|
||||
* @param string $bn_code The new BN Code.
|
||||
*/
|
||||
public function replace_bn_code( string $bn_code ) : void {
|
||||
public function replace_bn_code( string $bn_code ): void {
|
||||
$this->load_session();
|
||||
|
||||
$this->bn_code = $bn_code;
|
||||
|
@ -157,7 +157,7 @@ class SessionHandler {
|
|||
*
|
||||
* @return int
|
||||
*/
|
||||
public function insufficient_funding_tries() : int {
|
||||
public function insufficient_funding_tries(): int {
|
||||
$this->load_session();
|
||||
|
||||
return $this->insufficient_funding_tries;
|
||||
|
@ -169,7 +169,7 @@ class SessionHandler {
|
|||
public function increment_insufficient_funding_tries(): void {
|
||||
$this->load_session();
|
||||
|
||||
$this->insufficient_funding_tries++;
|
||||
++$this->insufficient_funding_tries;
|
||||
|
||||
$this->store_session();
|
||||
}
|
||||
|
@ -179,7 +179,7 @@ class SessionHandler {
|
|||
*
|
||||
* @return SessionHandler
|
||||
*/
|
||||
public function destroy_session_data() : SessionHandler {
|
||||
public function destroy_session_data(): SessionHandler {
|
||||
$this->order = null;
|
||||
$this->bn_code = '';
|
||||
$this->insufficient_funding_tries = 0;
|
||||
|
|
|
@ -277,7 +277,7 @@ class SettingsListener {
|
|||
sleep( $this->onboarding_retry_delay );
|
||||
}
|
||||
|
||||
$retry_count++;
|
||||
++$retry_count;
|
||||
$this->logger->info( 'Retrying onboarding return URL, retry nr: ' . ( (string) $retry_count ) );
|
||||
$redirect_url = add_query_arg( 'ppcpRetry', $retry_count );
|
||||
$this->redirector->redirect( $redirect_url );
|
||||
|
@ -569,7 +569,7 @@ class SettingsListener {
|
|||
*
|
||||
* @return array
|
||||
*/
|
||||
private function read_active_credentials_from_settings( array $settings ) : array {
|
||||
private function read_active_credentials_from_settings( array $settings ): array {
|
||||
if ( ! isset( $settings['client_id_sandbox'] ) && ! isset( $settings['client_id_production'] ) ) {
|
||||
return $settings;
|
||||
}
|
||||
|
@ -713,7 +713,7 @@ class SettingsListener {
|
|||
*
|
||||
* @return bool
|
||||
*/
|
||||
private function is_valid_site_request() : bool {
|
||||
private function is_valid_site_request(): bool {
|
||||
|
||||
if ( empty( $this->page_id ) ) {
|
||||
return false;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue