Simplify drafts excluding logic (ref #24136)
This commit is contained in:
parent
f551c6c792
commit
ce59afb2b9
|
@ -286,15 +286,6 @@ class WC_Settings_Products extends WC_Settings_Page {
|
|||
);
|
||||
|
||||
} else {
|
||||
$draft_pages = get_posts(
|
||||
array(
|
||||
'post_type' => 'page',
|
||||
'post_status' => 'draft',
|
||||
'fields' => 'ids',
|
||||
'posts_per_page' => -1,
|
||||
)
|
||||
);
|
||||
|
||||
$settings = apply_filters(
|
||||
'woocommerce_product_settings',
|
||||
apply_filters(
|
||||
|
@ -313,7 +304,7 @@ class WC_Settings_Products extends WC_Settings_Page {
|
|||
'id' => 'woocommerce_shop_page_id',
|
||||
'type' => 'single_select_page',
|
||||
'default' => '',
|
||||
'args' => array( 'exclude' => $draft_pages ),
|
||||
'args' => array( 'post_status' => 'publish,private' ),
|
||||
'class' => 'wc-enhanced-select-nostd',
|
||||
'css' => 'min-width:300px;',
|
||||
'desc_tip' => __( 'This sets the base page of your shop - this is where your product archive will be.', 'woocommerce' ),
|
||||
|
|
Loading…
Reference in New Issue