Merge pull request #20728 from woocommerce/fix/20708
Add edit_theme_options capability to shop manager role
This commit is contained in:
commit
1ef4aa10a0
|
@ -109,6 +109,10 @@ class WC_Install {
|
|||
'wc_update_343_cleanup_foreign_keys',
|
||||
'wc_update_343_db_version',
|
||||
),
|
||||
'3.4.4' => array(
|
||||
'wc_update_344_recreate_roles',
|
||||
'wc_update_344_db_version',
|
||||
),
|
||||
'3.5.0' => array(
|
||||
'wc_update_350_order_customer_id',
|
||||
'wc_update_350_db_version',
|
||||
|
@ -955,6 +959,7 @@ CREATE TABLE {$wpdb->prefix}woocommerce_termmeta (
|
|||
'export' => true,
|
||||
'import' => true,
|
||||
'list_users' => true,
|
||||
'edit_theme_options' => true,
|
||||
)
|
||||
);
|
||||
|
||||
|
|
|
@ -1836,6 +1836,25 @@ function wc_update_343_db_version() {
|
|||
WC_Install::update_db_version( '3.4.3' );
|
||||
}
|
||||
|
||||
/**
|
||||
* Recreate user roles so existing users will get the new capabilities.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
function wc_update_344_recreate_roles() {
|
||||
WC_Install::remove_roles();
|
||||
WC_Install::create_roles();
|
||||
}
|
||||
|
||||
/**
|
||||
* Update DB version.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
function wc_update_344_db_version() {
|
||||
WC_Install::update_db_version( '3.4.4' );
|
||||
}
|
||||
|
||||
/**
|
||||
* Copy order customer_id from post meta to post_author and set post_author to 0 for refunds.
|
||||
*
|
||||
|
|
Loading…
Reference in New Issue