Setup_Status::get_required_steps()
Summary
No summary available.Source
File: src/BigCommerce/Merchant/Setup_Status.php
public function get_required_steps() { $status = $this->get_current_status(); $steps = []; if ( empty( $status['product_count'] ) ) { $steps['import'] = [ 'heading' => __( 'Begin Creating and Importing Products in BigCommerce', 'bigcommerce' ), 'url' => $this->get_product_configuration_url(), 'label' => __( 'Open BigCommerce', 'bigcommerce' ), 'icon' => 'tag', ]; } if ( empty( $status['payment_methods'] ) ) { $steps['payment'] = [ 'heading' => __( 'Configure Your Payment Methods', 'bigcommerce' ), 'url' => $this->get_payment_configuration_url(), 'label' => __( 'Open BigCommerce', 'bigcommerce' ), 'icon' => 'currency', ]; } if ( empty( $status['shipping_zones'] ) ) { $steps['shipping'] = [ 'heading' => __( 'Configure Your Shipping Zones', 'bigcommerce' ), 'url' => $this->get_shipping_configuration_url(), 'label' => __( 'Open BigCommerce', 'bigcommerce' ), 'icon' => 'shipping_returns', ]; } if ( empty( $status['tax_classes'] ) ) { $steps['taxes'] = [ 'heading' => __( 'Configure Your Taxes', 'bigcommerce' ), 'url' => $this->get_tax_configuration_url(), 'label' => __( 'Open BigCommerce', 'bigcommerce' ), 'icon' => 'dollar-sign', ]; } $is_subdomain = isset( $status['domain'] ) && strpos( $status['domain'], parse_url( get_home_url(), PHP_URL_HOST ) ) !== false; if ( ! $is_subdomain ) { $steps['checkout_url'] = [ 'heading' => __( 'Checkout URL', 'bigcommerce' ), 'url' => $this->get_checkout_setup_documentation_url(), 'label' => __( 'Learn More', 'bigcommerce' ), 'icon' => 'store-front', ]; } /** * Filter the array of next steps required for setting up the * BigCommerce store. * * @var array $steps The required steps. Each item should be an associative array with: * - heading - The heading text to display for the step * - url - The URL the step's call to action will link to * - label - The text for the call to action */ return apply_filters( 'bigcommerce/settings/next-steps/required', $steps ); }