CssOption.php
1 week ago
CustomFieldDisabledOption.php
1 week ago
CustomFieldOption.php
1 week ago
DefaultOption.php
1 week ago
DisplayOnAccountAddressOption.php
1 week ago
DisplayOnAccountOrderOption.php
1 week ago
DisplayOnEmailsOption.php
1 week ago
DisplayOnOnlyAddressOption.php
1 week ago
DisplayOnOption.php
1 week ago
DisplayOnThankYouOption.php
1 week ago
DisplayOnWithoutAddressOption.php
1 week ago
EnabledOption.php
1 week ago
ExternalFieldInfoOption.php
1 week ago
ExternalFieldOption.php
1 week ago
FieldTypeDefaultOption.php
1 week ago
FieldTypeOption.php
1 week ago
FormattingFieldLabelOption.php
1 week ago
FormattingNewLineOption.php
1 week ago
FormattingOption.php
1 week ago
FormattingStateAbbrOption.php
1 week ago
FormattingStateCommaOption.php
1 week ago
FormattingStateOption.php
1 week ago
FormattingWcOption.php
1 week ago
ImageOption.php
1 week ago
ImageWidthOption.php
1 week ago
LabelOption.php
1 week ago
LabelOptionallyOption.php
1 week ago
LogicAdvOption.php
1 week ago
NameOption.php
1 week ago
OptionAbstract.php
1 week ago
OptionIntegration.php
1 week ago
OptionInterface.php
1 week ago
PlaceholderCheckboxOption.php
1 week ago
PlaceholderOption.php
1 week ago
PricingAdvOption.php
1 week ago
PriorityOption.php
1 week ago
RegexMessageOption.php
1 week ago
RegexPhoneOption.php
1 week ago
RequiredHiddenOption.php
1 week ago
RequiredOption.php
1 week ago
RequiredWcHiddenOption.php
1 week ago
SettingJqueryCssOption.php
1 week ago
SettingJqueryOption.php
1 week ago
SettingSectionsAdvOption.php
1 week ago
ValidationInfoOption.php
1 week ago
ValidationOption.php
1 week ago
ValidationPostcodeOption.php
1 week ago
ValidationWcOption.php
1 week ago
ValueMaxOption.php
1 week ago
ValueMinOption.php
1 week ago
ValueStepOption.php
1 week ago
LogicAdvOption.php
62 lines
| 1 | <?php |
| 2 | |
| 3 | namespace WPDesk\FCF\Free\Settings\Option; |
| 4 | |
| 5 | use WPDesk\FCF\Free\Settings\Tab\LogicTab; |
| 6 | |
| 7 | /** |
| 8 | * {@inheritdoc} |
| 9 | */ |
| 10 | class LogicAdvOption extends OptionAbstract { |
| 11 | |
| 12 | const FIELD_NAME = 'conditional_logic_adv'; |
| 13 | |
| 14 | /** |
| 15 | * {@inheritdoc} |
| 16 | */ |
| 17 | public function get_option_name(): string { |
| 18 | return self::FIELD_NAME; |
| 19 | } |
| 20 | |
| 21 | /** |
| 22 | * {@inheritdoc} |
| 23 | */ |
| 24 | public function get_option_tab(): string { |
| 25 | return LogicTab::TAB_NAME; |
| 26 | } |
| 27 | |
| 28 | /** |
| 29 | * {@inheritdoc} |
| 30 | */ |
| 31 | public function get_option_type(): string { |
| 32 | return self::FIELD_TYPE_INFO_ADV; |
| 33 | } |
| 34 | |
| 35 | public function get_option_label(): string { |
| 36 | $url = apply_filters( 'flexible_checkout_fields/short_url', '#', 'fcf-settings-section-custom-upgrade' ); |
| 37 | $url_woo_fields = apply_filters( 'flexible_checkout_fields/short_url', '#', 'fcf-settings-field-tab-logic-docs-woocommerce-default-upgrade' ); |
| 38 | $url_cart = apply_filters( 'flexible_checkout_fields/short_url', '#', 'fcf-settings-field-tab-logic-docs-cart-upgrade' ); |
| 39 | $url_user = apply_filters( 'flexible_checkout_fields/short_url', '#', 'fcf-settings-field-tab-logic-docs-user-role-upgrade' ); |
| 40 | $url_shipping = apply_filters( 'flexible_checkout_fields/short_url', '#', 'fcf-settings-field-tab-logic-docs-shipping-upgrade' ); |
| 41 | $url_payment = apply_filters( 'flexible_checkout_fields/short_url', '#', 'fcf-settings-field-tab-logic-docs-payment-upgrade' ); |
| 42 | $url_date = apply_filters( 'flexible_checkout_fields/short_url', '#', 'fcf-settings-field-tab-logic-docs-date-upgrade' ); |
| 43 | $url_fields = apply_filters( 'flexible_checkout_fields/short_url', '#', 'fcf-settings-field-tab-logic-docs-fcf-upgrade' ); |
| 44 | $url_fpf = apply_filters( 'flexible_checkout_fields/short_url', '#', 'fcf-settings-field-tab-logic-docs-fpf-upgrade' ); |
| 45 | $url_upgrade = apply_filters( 'flexible_checkout_fields/short_url', '#', 'fcf-settings-field-tab-logic-upgrade' ); |
| 46 | |
| 47 | return '<p>' . __( 'Set multiple conditions <b>(OR)</b> under one or more condition groups <b>(AND)</b>. Add conditional logic based on:', 'flexible-checkout-fields' ) . '</p> |
| 48 | <ul> |
| 49 | <li><a href="' . esc_url( $url_woo_fields ) . '" target="_blank">' . _x( 'WooCommerce default fields', 'pro-features-list', 'flexible-checkout-fields' ) . '</a></li> |
| 50 | <li><a href="' . esc_url( $url_cart ) . '" target="_blank">' . _x( 'Cart', 'pro-features-list', 'flexible-checkout-fields' ) . '</a></li> |
| 51 | <li><a href="' . esc_url( $url_user ) . '" target="_blank">' . _x( 'User role', 'pro-features-list', 'flexible-checkout-fields' ) . '</a></li> |
| 52 | <li><a href="' . esc_url( $url_shipping ) . '" target="_blank">' . _x( 'Shipping method', 'pro-features-list', 'flexible-checkout-fields' ) . '</a></li> |
| 53 | <li><a href="' . esc_url( $url_payment ) . '" target="_blank">' . _x( 'Payment method', 'pro-features-list', 'flexible-checkout-fields' ) . '</a></li> |
| 54 | <li><a href="' . esc_url( $url_date ) . '" target="_blank">' . _x( 'Date', 'pro-features-list', 'flexible-checkout-fields' ) . '</a></li> |
| 55 | <li><a href="' . esc_url( $url_fields ) . '" target="_blank">' . _x( 'Flexible Checkout Fields’ fields', 'pro-features-list', 'flexible-checkout-fields' ) . '</a></li> |
| 56 | <li><a href="' . esc_url( $url_fpf ) . '" target="_blank">' . _x( 'Flexible Product Fields’ fields', 'pro-features-list', 'flexible-checkout-fields' ) . '</a></li> |
| 57 | </ul> |
| 58 | <p><a href="' . esc_url( $url_upgrade ) . '" target="_blank" class="fcfArrowLink">' . __( 'Upgrade to PRO', 'flexible-checkout-fields' ) . '</a> |
| 59 | </p>'; |
| 60 | } |
| 61 | } |
| 62 |