Skip to content

Commit

Permalink
Merge branch 'v2.2.5'
Browse files Browse the repository at this point in the history
  • Loading branch information
jakubboucek committed Feb 8, 2021
2 parents 653dc0e + 11643e7 commit 58c176e
Show file tree
Hide file tree
Showing 4 changed files with 42 additions and 21 deletions.
50 changes: 34 additions & 16 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Contributors: redbitcz, simpleshopcz, jakubboucek, vasikgreif
Tags: simpleshop, simple eshop, selling form
Requires at least: 5.0.0
Tested up to: 5.4.0
Tested up to: 5.5
Requires PHP: 5.6.20
Stable tag: trunk
License: MIT
Expand Down
2 changes: 1 addition & 1 deletion src/Access.php
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,7 @@ public function user_can_view_content( $args = [] ) {
$group = new Group( $group_id );
$membership = new Membership( get_current_user_id() );

if ( $group_id ) {
if ( $group_id && $is_member === 'yes' ) {
if ( ! is_user_logged_in() || ! $membership->is_valid_for_group( $group_id ) ) {
return false;
}
Expand Down
9 changes: 6 additions & 3 deletions src/Settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -82,9 +82,11 @@ public function field_type_disconnect_button(
$object_type,
$field_type_object
) {
echo '<a href="' . admin_url( 'admin.php?page=ssc_options&disconnect_simpleshop=1' ) . '">'
. _e( 'Disconnect Simple Shop', 'simpleshop-cz' )
. '</a>';
printf(
'<a href="%s">%s</a>',
htmlspecialchars( admin_url( 'admin.php?page=ssc_options&disconnect_simpleshop=1' ) , ENT_QUOTES),
__( 'Disconnect Simple Shop', 'simpleshop-cz' )
);
}

/**
Expand Down Expand Up @@ -391,6 +393,7 @@ public function settings_notices( $object_id, $updated ) {

add_settings_error( $this->key . '-error', '', __( 'Error during communication with SimpleShop API, please try it later', 'simpleshop-cz' ), 'error' );
settings_errors( $this->key . '-error' );

return;
}

Expand Down

0 comments on commit 58c176e

Please sign in to comment.