256 ) { wp_die( esc_html__( 'The order signing secret must contain 32 to 256 characters.', 'selectika' ) ); } $c['order_secret'] = Selectika_Connection::encrypt( $secret ); } if ( $c['orders_enabled'] && ( '' === $c['order_endpoint'] || '' === $c['order_secret'] ) ) { $c['orders_enabled'] = false; } if ( is_multisite() ) { $c['service_opt_in'] = false; } } else { wp_die( esc_html__( 'Unknown Selectika action.', 'selectika' ) ); } update_option( Selectika_Connection::OPTION, $c, false ); Selectika_Catalog::schedule(); Selectika_Orders::schedule(); wp_safe_redirect( admin_url( 'options-general.php?page=selectika-connection' ) ); exit; } /** * Render the existing integration surface using current connection settings. */ public function render() { if ( ! current_user_can( 'manage_options' ) ) { return; } $c = Selectika_Connection::get(); $sealed = get_transient( 'selectika_token_' . get_current_user_id() ); $token = $sealed ? Selectika_Connection::decrypt( $sealed ) : ''; nocache_headers(); delete_transient( 'selectika_token_' . get_current_user_id() ); ?>

ยท

__( 'Selectika retailer ID', 'selectika' ), 'publisher_id' => __( 'Analytics publisher ID', 'selectika' ), 'order_endpoint' => __( 'Selectika order event endpoint', 'selectika' ), ) as $key => $label ) : ?> array( __( 'Service authorization', 'selectika' ), __( 'I connect this site to Selectika and authorize the documented external service communication.', 'selectika' ), ), 'catalog_enabled' => array( __( 'Catalog export', 'selectika' ), __( 'Enable authenticated catalog export', 'selectika' ), ), 'widgets_enabled' => array( __( 'Storefront widgets', 'selectika' ), __( 'Enable storefront widgets after visitor consent', 'selectika' ), ), 'tracking_enabled' => array( __( 'Commerce analytics', 'selectika' ), __( 'Enable native commerce analytics after visitor consent', 'selectika' ), ), 'orders_enabled' => array( __( 'Signed order delivery', 'selectika' ), __( 'Enable signed paid/cancelled/refunded order delivery when analytics consent was recorded', 'selectika' ), ), ) as $key => $labels ) : ?>

__( 'Generate / rotate read-only feed token', 'selectika' ), 'rebuild' => __( 'Build catalog snapshot', 'selectika' ), 'disconnect' => __( 'Disconnect and revoke owned credentials', 'selectika' ), ) as $action => $label ) : ?>