Hello @omardabbas
Sorry for late response.
I have suggestion on feed settings to show correct URL.
Now when I chose “Use Site Address (HOME_URL)” it doesn’t represent on “XML file path and name” URL field.
Also is writable doesn’t work correctly it returns site_url()
independently of “Use Site Address (HOME_URL)” option.
This code in class-alg-wc-product-xml-feeds-settings-feed.php
fixes both problems.
if ( 'yes' == $use_home_url ) {
$feed_path = get_home_path();
$feed_url = home_url() . '/' . get_option( 'alg_products_xml_file_path_' . $this->feed_num, $default_file_name );
} else {
$feed_path = ABSPATH;
$feed_url = site_url() . '/' . get_option( 'alg_products_xml_file_path_' . $this->feed_num, $default_file_name );
}
}
and
'desc' => __( 'URL:', 'product-xml-feeds-for-woocommerce' ) . ' ' . '<a target="_blank" href="' . $feed_url . '">' . $feed_url . '</a>',
Also, file doesn’t save, after amending class-alg-wc-product-xml-feeds-core
file to
// Create XML feed file
if ( 'yes' == get_option( 'alg_products_xml_use_home_url_' . $file_num, 'no' ) ) {
$new_path = get_home_path();
} else {
$new_path = ABSPATH;
}
return file_put_contents(
$new_path . get_option( 'alg_products_xml_file_path_' . $file_num, ( ( 1 == $file_num ) ? 'products.xml' : 'products_' . $file_num . '.xml' ) ),
do_shortcode( $xml_header_template ) . $xml_items . do_shortcode( $xml_footer_template )
);
file does save to correct location