plugin updates
This commit is contained in:
@@ -1484,7 +1484,11 @@ function wc_transaction_query( $type = 'start', $force = false ) {
|
||||
* @return string Url to cart page
|
||||
*/
|
||||
function wc_get_cart_url() {
|
||||
if ( is_cart() && isset( $_SERVER['HTTP_HOST'], $_SERVER['REQUEST_URI'] ) ) {
|
||||
// We don't use is_cart() here because that also checks for a defined constant. We are only interested in the page.
|
||||
$page_id = wc_get_page_id( 'cart' );
|
||||
$is_cart_page = ( $page_id && is_page( $page_id ) ) || wc_post_content_has_shortcode( 'woocommerce_cart' );
|
||||
|
||||
if ( $is_cart_page && isset( $_SERVER['HTTP_HOST'], $_SERVER['REQUEST_URI'] ) ) {
|
||||
$protocol = is_ssl() ? 'https' : 'http';
|
||||
$current_url = esc_url_raw( $protocol . '://' . wp_unslash( $_SERVER['HTTP_HOST'] ) . wp_unslash( $_SERVER['REQUEST_URI'] ) );
|
||||
$cart_url = remove_query_arg( array( 'remove_item', 'add-to-cart', 'added-to-cart', 'order_again', '_wpnonce' ), $current_url );
|
||||
@@ -1833,7 +1837,7 @@ function wc_uasort_comparison( $a, $b ) {
|
||||
}
|
||||
|
||||
/**
|
||||
* Sort values based on ascii, usefull for special chars in strings.
|
||||
* Sort values based on ascii, useful for special chars in strings.
|
||||
*
|
||||
* @param string $a First value.
|
||||
* @param string $b Second value.
|
||||
@@ -2524,7 +2528,7 @@ function wc_selected( $value, $options ) {
|
||||
* Retrieves the MySQL server version. Based on $wpdb.
|
||||
*
|
||||
* @since 3.4.1
|
||||
* @return array Vesion information.
|
||||
* @return array Version information.
|
||||
*/
|
||||
function wc_get_server_database_version() {
|
||||
global $wpdb;
|
||||
|
||||
Reference in New Issue
Block a user