Merge pull request #27145 from woocommerce/fix/26006

Fixed "virtual" and "downlodable" pointers on product walkthrough
This commit is contained in:
Néstor Soriano 2020-08-14 08:55:53 +02:00 committed by GitHub
commit f8ea11a607
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 20 additions and 7 deletions

View File

@ -6163,6 +6163,18 @@ table.bar_chart {
}
}
.post-type-product {
#wp-pointer-2 .wp-pointer-arrow {
left: 240px;
}
#wp-pointer-3 .wp-pointer-arrow,
#wp-pointer-4 .wp-pointer-arrow {
left: 46%;
}
}
/**
* Small screen optimisation
*/

View File

@ -2,10 +2,8 @@
/**
* Adds and controls pointers for contextual help/tutorials
*
* @author WooThemes
* @category Admin
* @package WooCommerce\Admin
* @version 2.4.0
* @package WooCommerce\Admin\Pointers
* @version 2.4.0
*/
if ( ! defined( 'ABSPATH' ) ) {
@ -28,7 +26,9 @@ class WC_Admin_Pointers {
* Setup pointers for screen.
*/
public function setup_pointers_for_screen() {
if ( ! $screen = get_current_screen() ) {
$screen = get_current_screen();
if ( ! $screen ) {
return;
}
@ -43,9 +43,10 @@ class WC_Admin_Pointers {
* Pointers for creating a product.
*/
public function create_product_tutorial() {
if ( ! isset( $_GET['tutorial'] ) || ! current_user_can( 'manage_options' ) ) {
if ( ! isset( $_GET['tutorial'] ) || ! current_user_can( 'manage_options' ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Recommended
return;
}
// These pointers will chain - they will not be shown at once.
$pointers = array(
'pointers' => array(
@ -218,7 +219,7 @@ class WC_Admin_Pointers {
/**
* Enqueue pointers and add script to page.
*
* @param array $pointers
* @param array $pointers Pointers data.
*/
public function enqueue_pointers( $pointers ) {
$pointers = rawurlencode( wp_json_encode( $pointers ) );