michaelopatskyi commented on 17 Jan 2017 • edited
edited
Notice: WC_Shortcode_Checkout->output was called with an argument that is deprecated since version 2.1! "order" is no longer used to pass an order ID. Use the order-pay or order-received endpoint instead. in /var/www/dev/tofa/wp-includes/functions.php on line 3975 Wordpress Plugin |
marti1125 added the question label on 17 Jan 2017
Hello @michaelopatskyi is not an error about the plugin is a problem with woocommerce try to set false in debug of wp |
michaelopatskyi commented on 19 Jan 2017 • edited
edited
thank You for an answer |
'WEB > WP(WordPress)' 카테고리의 다른 글
Wordpress wpdb undefined variable (0) | 2018.04.26 |
---|---|
wp_mail( string|array $to, string $subject, string $message, string|array $headers = '', string|array $attachments = array() ) Send mail, similar to PHP’s mail (0) | 2018.04.24 |
Custom payment gateway - redirect to the bank's page (0) | 2018.04.24 |
WC_API – The WooCommerce API Callback (0) | 2018.04.23 |
add_query_arg() (0) | 2018.04.20 |
Assuming we’re at the WordPress URL “http://blog.example.com/client/?s=word”… Note the use of
esc_url()
before outputting the link. This is necessary because this function does not escape URLs and if output without escaping, would make the page vulnerable to XSS scripting.// This would output '/client/?s=word&foo=bar'
echo
esc_url( add_query_arg(
'foo'
,
'bar'
) );
// This would output '/client/?s=word&foo=bar&baz=tiny'
$arr_params
=
array
(
'foo'
=>
'bar'
,
'baz'
=>
'tiny'
);
echo
esc_url( add_query_arg(
$arr_params
) );
Since
get_permalink()
returns a full URL, you could use that when you want to add variables to a post’s page./*
* This would output whatever the URL to post ID 9 is, with 'hello=there'
* appended with either ? or &, depending on what's needed.
*/
echo
esc_url( add_query_arg(
'hello'
,
'there'
, get_permalink( 9 ) ) );
To safely redirect user to a custom page inside
plugins.php
// Redirect to Welcome Page.
// Redirects to your-domain.com/wp-admin/plugin.php?page=your_plugin_page.
wp_safe_redirect( add_query_arg(
array
(
'page'
=>
'your_plugin_page'
), admin_url(
'plugins.php'
) ) );
More often than not you’ll probably find yourself creating URLs using the following method within the page you’re currently on. In these cases you can use the URL you want to affect as the last parameter. The use of
esc_url()
is not required here, because the value is known to be safe.// This would output 'http://blog.example.com/2009/04/16/?hello=world'
echo
esc_url( add_query_arg(
'hello'
,
'world'
,
'http://blog.example.com/2009/04/16/'
) );
Removing values and setting via an associative array:
$query
=
'http://example.com/link?foo=bar'
;
$new_query
= add_query_arg(
array
(
'foo'
=> false,
'baz'
=>
'qux'
),
$query
);
print
(
$new_query
);
// http://example.com/link?baz=qux
A way to get the current total url using
add_query_arg
home_url( add_query_arg( null, null ));