Create the refund and returns policy page on a DB update routine

This commit is contained in:
roykho 2021-06-29 12:18:01 -07:00
parent 4585c7ef7f
commit be53a0283e
No known key found for this signature in database
GPG Key ID: 7B36C0EA25795714
2 changed files with 20 additions and 0 deletions

View File

@ -161,6 +161,10 @@ class WC_Install {
'wc_update_500_fix_product_review_count',
'wc_update_500_db_version',
),
'5.6.0' => array(
'wc_update_560_create_refund_returns_page',
'wc_update_560_db_version',
),
);
/**

View File

@ -2266,3 +2266,19 @@ function wc_update_500_fix_product_review_count() {
function wc_update_500_db_version() {
WC_Install::update_db_version( '5.0.0' );
}
/**
* Creates the refund and returns policy page.
*
* See @link https://github.com/woocommerce/woocommerce/issues/29235.
*/
function wc_update_560_create_refund_returns_page() {
WC_Install::create_pages();
}
/**
* Update DB version to 5.6.0.
*/
function wc_update_560_db_version() {
WC_Install::update_db_version( '5.6.0' );
}