Merge pull request #27145 from woocommerce/fix/26006
Fixed "virtual" and "downlodable" pointers on product walkthrough
This commit is contained in:
commit
f8ea11a607
|
@ -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
|
||||
*/
|
||||
|
|
|
@ -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 ) );
|
||||
|
|
Loading…
Reference in New Issue