Skip Navigation
availability:

WooCommerce Multilingual Version: 3.5

description:

Add or remove the WooCommerce page option names used in WooCommerce Multilingual.

type:
filter
category:
Miscellaneous
parameters:
add_filter( 'wcml_wc_installed_pages', 'the_callback_function', 10, 1 );

There is only one parameter passed to this filter: page_option_names.

$page_option_names
(array) The page option name array looks like the following:
array(
'woocommerce_shop_page_id',
'woocommerce_cart_page_id',
'woocommerce_checkout_page_id',
'woocommerce_myaccount_page_id'
)
hook example usage:

Example

/**
 * Add this code to the functions.php file of your theme.
 */
 
add_filter( 'wcml_wc_installed_pages', 'add_wc_installed_pages', 10, 1 );
 
function add_wc_installed_pages( $page_option_names ) {
     
    // A new page option name 
    $page_option_names[] = 'woocommerce_custom_page_id'; 
    return $page_option_names;
}