Don't show the incentive page if the user can't manage WC
This commit is contained in:
parent
6fe5cba053
commit
e72756b0eb
|
@ -63,6 +63,11 @@ class WcPayWelcomePage {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// The current WP user must have the capabilities required to set up WooPayments.
|
||||||
|
if ( ! current_user_can( 'manage_woocommerce' ) ) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
// Suggestions not disabled via a setting.
|
// Suggestions not disabled via a setting.
|
||||||
if ( get_option( 'woocommerce_show_marketplace_suggestions', 'yes' ) === 'no' ) {
|
if ( get_option( 'woocommerce_show_marketplace_suggestions', 'yes' ) === 'no' ) {
|
||||||
return false;
|
return false;
|
||||||
|
|
Loading…
Reference in New Issue