id = ''; $this->desc = __( 'General', 'amount-left-free-shipping-woocommerce' ); parent::__construct(); } /** * get_settings. * * @version 1.3.0 * @since 1.0.0 * @todo [dev] "notice" as "position" in cart and checkout * @todo [feature] multiple positions in cart / checkout / minicart */ function get_settings() { $desc = '
' . '

' . 'ℹ' . ' ' . __( 'Here you can enable info on cart, mini cart and checkout pages.', 'amount-left-free-shipping-woocommerce' ) . ' ' . sprintf( __( 'Values that will be replaced in "Content": %s.', 'amount-left-free-shipping-woocommerce' ), '%amount_left_for_free_shipping%, %free_shipping_min_amount%, %current_cart_total%' ) . '

' . '

' . '' . __( 'Alternatively you can use:', 'amount-left-free-shipping-woocommerce' ) . '' . '

    ' . '
  1. ' . '' . __( 'Widget', 'amount-left-free-shipping-woocommerce' ) . '' . ': ' . '' . __( 'Amount Left for Free Shipping', 'amount-left-free-shipping-woocommerce' ) . '' . '
  2. ' . '
  3. ' . '' . __( 'Shortcode', 'amount-left-free-shipping-woocommerce' ) . '' . ': ' . '[alg_wc_left_to_free_shipping content="%amount_left_for_free_shipping% left for free shipping"]' . '
  4. ' . '
  5. ' . '' . __( 'PHP function', 'amount-left-free-shipping-woocommerce' ) . '' . ': ' . 'alg_wc_get_left_to_free_shipping( "%amount_left_for_free_shipping% left for free shipping" );' . '
  6. ' . '
' . '

' . '
'; $settings = array( array( 'title' => __( 'Amount Left for Free Shipping Options', 'amount-left-free-shipping-woocommerce' ), 'desc' => $desc, 'type' => 'title', 'id' => 'alg_wc_left_to_free_shipping_options', ), array( 'title' => __( 'Amount Left for Free Shipping', 'amount-left-free-shipping-woocommerce' ), 'desc' => '' . __( 'Enable plugin', 'amount-left-free-shipping-woocommerce' ) . '', 'id' => 'alg_wc_left_to_free_shipping_enabled', 'default' => 'yes', 'type' => 'checkbox', ), array( 'type' => 'sectionend', 'id' => 'alg_wc_left_to_free_shipping_options', ), array( 'title' => __( 'Cart Options', 'amount-left-free-shipping-woocommerce' ), 'type' => 'title', 'id' => 'alg_wc_left_to_free_shipping_cart_options', ), array( 'title' => __( 'Enable/Disable', 'amount-left-free-shipping-woocommerce' ), 'desc' => __( 'Enable section', 'amount-left-free-shipping-woocommerce' ), 'id' => 'alg_wc_left_to_free_shipping_info_enabled_cart', 'default' => 'no', 'type' => 'checkbox', ), array( 'title' => __( 'Content', 'amount-left-free-shipping-woocommerce' ), 'desc_tip' => __( 'You can use HTML and/or shortcodes here.', 'amount-left-free-shipping-woocommerce' ), 'id' => 'alg_wc_left_to_free_shipping_info_content_cart', 'default' => sprintf( __( '%s left for free shipping', 'amount-left-free-shipping-woocommerce' ), '%amount_left_for_free_shipping%' ), 'type' => 'textarea', 'css' => 'width:100%;height:100px;', 'alg_wc_alfs_raw' => true, ), array( 'title' => __( 'Position', 'amount-left-free-shipping-woocommerce' ), 'id' => 'alg_wc_left_to_free_shipping_info_position_cart', 'default' => 'woocommerce_after_cart_totals', 'type' => 'select', 'options' => array( 'woocommerce_before_cart' => __( 'Before cart', 'amount-left-free-shipping-woocommerce' ), 'woocommerce_before_cart_table' => __( 'Before cart table', 'amount-left-free-shipping-woocommerce' ), 'woocommerce_before_cart_contents' => __( 'Before cart contents', 'amount-left-free-shipping-woocommerce' ), 'woocommerce_cart_contents' => __( 'Cart contents', 'amount-left-free-shipping-woocommerce' ), 'woocommerce_cart_coupon' => __( 'Cart coupon', 'amount-left-free-shipping-woocommerce' ), 'woocommerce_cart_actions' => __( 'Cart actions', 'amount-left-free-shipping-woocommerce' ), 'woocommerce_after_cart_contents' => __( 'After cart contents', 'amount-left-free-shipping-woocommerce' ), 'woocommerce_after_cart_table' => __( 'After cart table', 'amount-left-free-shipping-woocommerce' ), 'woocommerce_cart_collaterals' => __( 'Cart collaterals', 'amount-left-free-shipping-woocommerce' ), 'woocommerce_after_cart' => __( 'After cart', 'amount-left-free-shipping-woocommerce' ), 'woocommerce_before_cart_totals' => __( 'Before cart totals', 'amount-left-free-shipping-woocommerce' ), 'woocommerce_cart_totals_before_shipping' => __( 'Cart totals: Before shipping', 'amount-left-free-shipping-woocommerce' ), 'woocommerce_cart_totals_after_shipping' => __( 'Cart totals: After shipping', 'amount-left-free-shipping-woocommerce' ), 'woocommerce_cart_totals_before_order_total' => __( 'Cart totals: Before order total', 'amount-left-free-shipping-woocommerce' ), 'woocommerce_cart_totals_after_order_total' => __( 'Cart totals: After order total', 'amount-left-free-shipping-woocommerce' ), 'woocommerce_proceed_to_checkout' => __( 'Proceed to checkout', 'amount-left-free-shipping-woocommerce' ), 'woocommerce_after_cart_totals' => __( 'After cart totals', 'amount-left-free-shipping-woocommerce' ), 'woocommerce_before_shipping_calculator' => __( 'Before shipping calculator', 'amount-left-free-shipping-woocommerce' ), 'woocommerce_after_shipping_calculator' => __( 'After shipping calculator', 'amount-left-free-shipping-woocommerce' ), 'woocommerce_cart_is_empty' => __( 'If cart is empty', 'amount-left-free-shipping-woocommerce' ), ), ), array( 'title' => __( 'Position order (priority)', 'amount-left-free-shipping-woocommerce' ), 'desc_tip' => __( 'Here you can move the info inside the Position selected above.', 'amount-left-free-shipping-woocommerce' ), 'id' => 'alg_wc_left_to_free_shipping_info_priority_cart', 'default' => 10, 'type' => 'number', ), array( 'type' => 'sectionend', 'id' => 'alg_wc_left_to_free_shipping_cart_options', ), array( 'title' => __( 'Mini Cart Options', 'amount-left-free-shipping-woocommerce' ), 'type' => 'title', 'id' => 'alg_wc_left_to_free_shipping_mini_cart_options', ), array( 'title' => __( 'Enable/Disable', 'amount-left-free-shipping-woocommerce' ), 'desc' => __( 'Enable section', 'amount-left-free-shipping-woocommerce' ), 'id' => 'alg_wc_left_to_free_shipping_info_enabled_mini_cart', 'default' => 'no', 'type' => 'checkbox', 'custom_attributes' => apply_filters( 'alg_wc_left_to_free_shipping', array( 'disabled' => 'disabled' ), 'settings' ), 'desc_tip' => apply_filters( 'alg_wc_left_to_free_shipping', sprintf( __( 'You will need Amount Left for Free Shipping for WooCommerce Pro plugin to enable this option.', 'amount-left-free-shipping-woocommerce' ), 'https://wpfactory.com/item/amount-left-free-shipping-woocommerce/' ), 'settings' ), ), array( 'title' => __( 'Content', 'amount-left-free-shipping-woocommerce' ), 'desc_tip' => __( 'You can use HTML and/or shortcodes here.', 'amount-left-free-shipping-woocommerce' ), 'id' => 'alg_wc_left_to_free_shipping_info_content_mini_cart', 'default' => sprintf( __( '%s left for free shipping', 'amount-left-free-shipping-woocommerce' ), '%amount_left_for_free_shipping%' ), 'type' => 'textarea', 'css' => 'width:100%;height:100px;', 'alg_wc_alfs_raw' => true, ), array( 'title' => __( 'Position', 'amount-left-free-shipping-woocommerce' ), 'id' => 'alg_wc_left_to_free_shipping_info_position_mini_cart', 'default' => 'woocommerce_after_mini_cart', 'type' => 'select', 'options' => array( 'woocommerce_before_mini_cart' => __( 'Before mini cart', 'amount-left-free-shipping-woocommerce' ), 'woocommerce_widget_shopping_cart_before_buttons' => __( 'Before buttons', 'amount-left-free-shipping-woocommerce' ), 'woocommerce_after_mini_cart' => __( 'After mini cart', 'amount-left-free-shipping-woocommerce' ), ), ), array( 'title' => __( 'Position order (priority)', 'amount-left-free-shipping-woocommerce' ), 'desc_tip' => __( 'Here you can move the info inside the Position selected above.', 'amount-left-free-shipping-woocommerce' ), 'id' => 'alg_wc_left_to_free_shipping_info_priority_mini_cart', 'default' => 10, 'type' => 'number', ), array( 'type' => 'sectionend', 'id' => 'alg_wc_left_to_free_shipping_mini_cart_options', ), array( 'title' => __( 'Checkout Options', 'amount-left-free-shipping-woocommerce' ), 'type' => 'title', 'id' => 'alg_wc_left_to_free_shipping_checkout_options', ), array( 'title' => __( 'Enable/Disable', 'amount-left-free-shipping-woocommerce' ), 'desc' => __( 'Enable section', 'amount-left-free-shipping-woocommerce' ), 'id' => 'alg_wc_left_to_free_shipping_info_enabled_checkout', 'default' => 'no', 'type' => 'checkbox', 'custom_attributes' => apply_filters( 'alg_wc_left_to_free_shipping', array( 'disabled' => 'disabled' ), 'settings' ), 'desc_tip' => apply_filters( 'alg_wc_left_to_free_shipping', sprintf( __( 'You will need Amount Left for Free Shipping for WooCommerce Pro plugin to enable this option.', 'amount-left-free-shipping-woocommerce' ), 'https://wpfactory.com/item/amount-left-free-shipping-woocommerce/' ), 'settings' ), ), array( 'title' => __( 'Content', 'amount-left-free-shipping-woocommerce' ), 'desc_tip' => __( 'You can use HTML and/or shortcodes here.', 'amount-left-free-shipping-woocommerce' ), 'id' => 'alg_wc_left_to_free_shipping_info_content_checkout', 'default' => sprintf( __( '%s left for free shipping', 'amount-left-free-shipping-woocommerce' ), '%amount_left_for_free_shipping%' ), 'type' => 'textarea', 'css' => 'width:100%;height:100px;', 'alg_wc_alfs_raw' => true, ), array( 'title' => __( 'Position', 'amount-left-free-shipping-woocommerce' ), 'id' => 'alg_wc_left_to_free_shipping_info_position_checkout', 'default' => 'woocommerce_checkout_after_order_review', 'type' => 'select', 'options' => array( 'woocommerce_before_checkout_form' => __( 'Before checkout form', 'amount-left-free-shipping-woocommerce' ), 'woocommerce_checkout_before_customer_details' => __( 'Before customer details', 'amount-left-free-shipping-woocommerce' ), 'woocommerce_checkout_billing' => __( 'Billing', 'amount-left-free-shipping-woocommerce' ), 'woocommerce_checkout_shipping' => __( 'Shipping', 'amount-left-free-shipping-woocommerce' ), 'woocommerce_checkout_after_customer_details' => __( 'After customer details', 'amount-left-free-shipping-woocommerce' ), 'woocommerce_checkout_before_order_review' => __( 'Before order review', 'amount-left-free-shipping-woocommerce' ), 'woocommerce_checkout_order_review' => __( 'Order review', 'amount-left-free-shipping-woocommerce' ), 'woocommerce_review_order_before_shipping' => __( 'Order review: Before shipping', 'amount-left-free-shipping-woocommerce' ), 'woocommerce_review_order_after_shipping' => __( 'Order review: After shipping', 'amount-left-free-shipping-woocommerce' ), 'woocommerce_review_order_before_submit' => __( 'Order review: Payment: Before submit button', 'amount-left-free-shipping-woocommerce' ), 'woocommerce_review_order_after_submit' => __( 'Order review: Payment: After submit button', 'amount-left-free-shipping-woocommerce' ), 'woocommerce_checkout_after_order_review' => __( 'After order review', 'amount-left-free-shipping-woocommerce' ), 'woocommerce_after_checkout_form' => __( 'After checkout form', 'amount-left-free-shipping-woocommerce' ), ), ), array( 'title' => __( 'Position order (priority)', 'amount-left-free-shipping-woocommerce' ), 'desc_tip' => __( 'Here you can move the info inside the Position selected above.', 'amount-left-free-shipping-woocommerce' ), 'id' => 'alg_wc_left_to_free_shipping_info_priority_checkout', 'default' => 10, 'type' => 'number', ), array( 'type' => 'sectionend', 'id' => 'alg_wc_left_to_free_shipping_checkout_options', ), array( 'title' => __( '"Free Shipping Reached" Options', 'amount-left-free-shipping-woocommerce' ), 'type' => 'title', 'id' => 'alg_wc_left_to_free_shipping_reached_options', ), array( 'title' => __( 'Message on Free Shipping Reached', 'amount-left-free-shipping-woocommerce' ), 'desc_tip' => __( 'You can use HTML and/or shortcodes here.', 'amount-left-free-shipping-woocommerce' ) . ' ' . __( 'To disable - set it empty.', 'amount-left-free-shipping-woocommerce' ), 'id' => 'alg_wc_left_to_free_shipping_info_content_reached', 'default' => __( 'You have free delivery!', 'amount-left-free-shipping-woocommerce' ), 'type' => 'textarea', 'css' => 'width:100%;height:100px;', 'alg_wc_alfs_raw' => true, ), array( 'type' => 'sectionend', 'id' => 'alg_wc_left_to_free_shipping_reached_options', ), ); return $settings; } } endif; return new Alg_WC_Left_To_Free_Shipping_Settings_General();